From 84b8ca626e523c9c8e413366c016185fe11a2975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 29 Sep 2023 16:48:52 +0200 Subject: [PATCH] [FIX] base_automation: avoid wrong server action view choice When creating new primary views you should always specify the priority to avoid having the specific view used as default. This one is specific to base automation usage of server actions. Also move view in its own file to respect guideines. RIP JEM. Task-3527758 (Base Automation Refactor Fiximp) Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint) Part-of: odoo/odoo#137133 --- addons/base_automation/__manifest__.py | 1 + .../views/base_automation_views.xml | 24 +----------------- .../views/ir_actions_server_views.xml | 25 +++++++++++++++++++ 3 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 addons/base_automation/views/ir_actions_server_views.xml diff --git a/addons/base_automation/__manifest__.py b/addons/base_automation/__manifest__.py index c28fc823021..81926b7c1d3 100644 --- a/addons/base_automation/__manifest__.py +++ b/addons/base_automation/__manifest__.py @@ -19,6 +19,7 @@ trigger an automatic reminder email. 'data': [ 'security/ir.model.access.csv', 'data/base_automation_data.xml', + 'views/ir_actions_server_views.xml', 'views/base_automation_views.xml', ], 'assets': { diff --git a/addons/base_automation/views/base_automation_views.xml b/addons/base_automation/views/base_automation_views.xml index 6f392a75f51..469f4f62e1c 100644 --- a/addons/base_automation/views/base_automation_views.xml +++ b/addons/base_automation/views/base_automation_views.xml @@ -88,7 +88,7 @@ name="action_server_ids" widget="one2many" class="o_base_automation_actions_field" - context="{'default_model_id': model_id, 'default_state': False, 'form_view_ref': 'base_automation.view_server_action_form'}" + context="{'default_model_id': model_id, 'default_state': False, 'form_view_ref': 'base_automation.ir_actions_server_view_form_automation'}" > @@ -132,28 +132,6 @@ - - - base.automation.server.action.form - ir.actions.server - primary - - - - 1 - - - Type - - - 1 - - - 1 - - - - base.automation.tree diff --git a/addons/base_automation/views/ir_actions_server_views.xml b/addons/base_automation/views/ir_actions_server_views.xml new file mode 100644 index 00000000000..b7704c7b3cc --- /dev/null +++ b/addons/base_automation/views/ir_actions_server_views.xml @@ -0,0 +1,25 @@ + + + + + ir.actions.server.view.form.automation + ir.actions.server + primary + 32 + + + + 1 + + + Type + + + 1 + + + 1 + + + +