From d39b13121b81db71609a2d48651c75094e249f91 Mon Sep 17 00:00:00 2001 From: Bastien PIERRE Date: Wed, 13 Dec 2023 14:18:22 +0100 Subject: [PATCH] [FIX] base: Automated action default update path Before this commit, the default update_path even if the field was readonly, it weas returned. So, if you try to create an automated action on the stock.move.line model and try to add an action, the button return a traceback because the field is readonly. After this commit, the method that get the default update_path will also check if the field is not readonly. Bugfix Task-Id: 3624328 closes odoo/odoo#146166 Signed-off-by: Bouvy Damien (dbo) --- odoo/addons/base/models/ir_actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/addons/base/models/ir_actions.py b/odoo/addons/base/models/ir_actions.py index 6e5d03c5ec2..bb6da7e0167 100644 --- a/odoo/addons/base/models/ir_actions.py +++ b/odoo/addons/base/models/ir_actions.py @@ -468,7 +468,7 @@ class IrActionsServer(models.Model): model = self.env[ir_model.model] sensible_default_fields = ['partner_id', 'user_id', 'user_ids', 'stage_id', 'state', 'active'] for field_name in sensible_default_fields: - if field_name in model._fields: + if field_name in model._fields and not model._fields[field_name].readonly: return field_name return ''