[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) <dbo@odoo.com>
This commit is contained in:
@@ -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 ''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user