From 251e558ff200b49143115b1059d72d4c57331dc4 Mon Sep 17 00:00:00 2001 From: niyasraphy Date: Tue, 29 Aug 2023 21:25:00 +0300 Subject: [PATCH] [IMP] base: remove activate module server action before this commit, from list view users can install module using the button in list view and from the action button. initially the Install button was not available in the list view and only option to install multiple apps was from the action button. but with the introduction of the button in list header there is no need for an another server action to perform the same. after this commit, the activate modules server action will be removed from the code and its related test and also newly added Install button will be renamed to "Activate" to align with the button in kanban and form. closes odoo/odoo#133544 Signed-off-by: Xavier Morel (xmo) --- odoo/addons/base/__manifest__.py | 1 - odoo/addons/base/data/ir_actions_data.xml | 12 ------------ odoo/addons/base/models/ir_module.py | 9 --------- odoo/addons/base/tests/test_views.py | 1 - odoo/addons/base/views/ir_module_views.xml | 2 +- 5 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 odoo/addons/base/data/ir_actions_data.xml diff --git a/odoo/addons/base/__manifest__.py b/odoo/addons/base/__manifest__.py index f57cf22966b..66ccda83ef4 100644 --- a/odoo/addons/base/__manifest__.py +++ b/odoo/addons/base/__manifest__.py @@ -58,7 +58,6 @@ The kernel of Odoo, needed for all installation. 'wizard/base_module_uninstall_views.xml', 'wizard/base_export_language_views.xml', 'wizard/base_partner_merge_views.xml', - 'data/ir_actions_data.xml', 'data/ir_demo_failure_data.xml', 'views/ir_profile_views.xml', 'views/res_company_views.xml', diff --git a/odoo/addons/base/data/ir_actions_data.xml b/odoo/addons/base/data/ir_actions_data.xml deleted file mode 100644 index a4a0a6a5218..00000000000 --- a/odoo/addons/base/data/ir_actions_data.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Activate Modules - - - code - records.button_immediate_install() - - - diff --git a/odoo/addons/base/models/ir_module.py b/odoo/addons/base/models/ir_module.py index fed9a5a0474..87c8543c249 100644 --- a/odoo/addons/base/models/ir_module.py +++ b/odoo/addons/base/models/ir_module.py @@ -148,15 +148,6 @@ class Module(models.Model): _description = "Module" _order = 'application desc,sequence,name' - @api.model - def get_views(self, views, options=None): - res = super().get_views(views, options) - if res['views'].get('form', {}).get('toolbar'): - install_id = self.env.ref('base.action_server_module_immediate_install').id - action = [rec for rec in res['views']['form']['toolbar']['action'] if rec.get('id', False) != install_id] - res['views']['form']['toolbar'] = {'action': action} - return res - @classmethod def get_module_info(cls, name): try: diff --git a/odoo/addons/base/tests/test_views.py b/odoo/addons/base/tests/test_views.py index cdac518e261..aa6f7cc6868 100644 --- a/odoo/addons/base/tests/test_views.py +++ b/odoo/addons/base/tests/test_views.py @@ -2850,7 +2850,6 @@ class TestViews(ViewCase): self.assertInvalid(arch % 'base.random_xmlid', 'Invalid xmlid base.random_xmlid for button of type action') self.assertInvalid('