diff --git a/bemade_odoo_partner_scrapper/static/src/js/odoo_scrapper.js b/bemade_odoo_partner_scrapper/static/src/js/odoo_scrapper.js deleted file mode 100644 index cd7b9ef..0000000 --- a/bemade_odoo_partner_scrapper/static/src/js/odoo_scrapper.js +++ /dev/null @@ -1,68 +0,0 @@ -/** @odoo-module **/ - -import ListController from 'web.ListController'; -import ListView from 'web.ListView'; - -import KanbanController from 'web.KanbanController'; -import KanbanView from 'web.KanbanView'; - -const viewRegistry = require('web.view_registry'); - -const OdooScrapperListController = ListController.extend({ - // buttons_template must match the t-name on the template for the button (static xml) - buttons_template: 'odoo_scrapper.list_view_buttons', - events: _.extend({}, ListController.prototype.events, { - 'click .o_button_get_partner': '_onGetPartnerClick', - }), - // This may need to be async function() if there needs to be an await this._rpc({ ... }); call to not reload early - _onGetPartnerClick: function () { - this._rpc({ - model: 'res.partner', - method: 'get_odoo_partner', - args: [], - }).then(() => { - this.reload(); - }); - // Couldn't test this for real, but it runs the action. May need a this.reload() - }, -}); - -export const OdooScrapperListView = ListView.extend({ - config: _.extend({}, ListView.prototype.config, { - Controller: OdooScrapperListController, - }), -}); - -// key must match with the js_class attribute of the tree view you want to modify -viewRegistry.add('res_partner_odoo_scrapper_tree', OdooScrapperListView); - -const OdooScrapperKanbanController = KanbanController.extend({ - // buttons_template must match the t-name on the template for the button (static xml) - buttons_template: 'odoo_scrapper.kanban_view_buttons', - events: _.extend({}, KanbanController.prototype.events, { - 'click .o_button_get_partner': '_onGetPartnerClick', - }), - // This may need to be async function() if there needs to be an await this._rpc({ ... }); call to not reload early - _onGetPartnerClick: function () { - this._rpc({ - model: 'res.partner', - method: 'get_odoo_partner', - args: [], - }).then(() => { - this.reload(); - }); - // Couldn't test this for real, but it runs the action. May need a this.reload() - }, -}); - -export const OdooScrapperKanbanView = KanbanView.extend({ - config: _.extend({}, KanbanView.prototype.config, { - Controller: OdooScrapperKanbanController, - }), -}); - -// key must match with the js_class attribute of the tree view you want to modify -viewRegistry.add('res_partner_odoo_scrapper_kanban', OdooScrapperKanbanView); - - - diff --git a/bemade_odoo_partner_scrapper/static/src/xml/odoo_scrapper_templates.xml b/bemade_odoo_partner_scrapper/static/src/xml/odoo_scrapper_templates.xml deleted file mode 100644 index af0a1dd..0000000 --- a/bemade_odoo_partner_scrapper/static/src/xml/odoo_scrapper_templates.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bemade_odoo_partner_scrapper/views/res_partner_views.xml b/bemade_odoo_partner_scrapper/views/res_partner_views.xml index 9dc982c..9e16ea9 100644 --- a/bemade_odoo_partner_scrapper/views/res_partner_views.xml +++ b/bemade_odoo_partner_scrapper/views/res_partner_views.xml @@ -8,19 +8,22 @@
- Odoo User - Odoo Partner + +Odoo User + +Odoo Partner
-

Partner

+

+ + Partner

- + @@ -38,9 +41,6 @@ res.partner - - res_partner_odoo_scrapper_tree - @@ -54,20 +54,17 @@ res.partner - - res_partner_odoo_scrapper_kanban - - + oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban oe_kanban_color_#{record.color} - + - +