From b4eaf7cebf3be577ab8eb49530fb92129faa2892 Mon Sep 17 00:00:00 2001 From: yhu-odoo Date: Fri, 9 Oct 2020 13:54:14 +0000 Subject: [FIX] base: add 'flags' to _get_readable_fields 'flags' is not a field in ir.actions.act_window, but it's used to pass parameters to generate the action window. For example, {'flag': {'withControlPanel': False}} can be used to hide the control panel. in _get_readable_fields, 'flags' is not included. This makes the configuration passed by 'flags' not work. We add 'flags' to fix the issue. To reproduce, go to workorder and enter the tablet view by starting the workorder. The control panel will be shown, even though {'flags': {'withControlPanel': False}} is passed in the returned action. closes odoo/odoo#59662 Signed-off-by: Martin Trigaux (mat) --- odoo/addons/base/models/ir_actions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/odoo/addons/base/models/ir_actions.py b/odoo/addons/base/models/ir_actions.py index 4287870db26..719ce0a4fda 100644 --- a/odoo/addons/base/models/ir_actions.py +++ b/odoo/addons/base/models/ir_actions.py @@ -277,6 +277,9 @@ class IrActionsActWindow(models.Model): "context", "domain", "filter", "groups_id", "limit", "res_id", "res_model", "search_view", "search_view_id", "target", "view_id", "view_mode", "views", + # `flags` is not a real field of ir.actions.act_window but is used + # to give the parameters to generate the action + "flags" } -- cgit v1.2.3