diff --git a/odoo/addons/base/ir/ir_actions.py b/odoo/addons/base/ir/ir_actions.py index bacca6d78d3..81febad8e38 100644 --- a/odoo/addons/base/ir/ir_actions.py +++ b/odoo/addons/base/ir/ir_actions.py @@ -557,6 +557,9 @@ class IrActionsServer(models.Model): active_id = self._context.get('active_id') if not active_id and self._context.get('onchange_self'): active_id = self._context['onchange_self']._origin.id + if not active_id: # onchange on new record + func = getattr(self, 'run_action_%s' % action.state) + res = func(action, eval_context=eval_context) active_ids = self._context.get('active_ids', [active_id] if active_id else []) for active_id in active_ids: # run context dedicated to a particular active_id