diff --git a/odoo/exceptions.py b/odoo/exceptions.py index 43281b8bca9..af5f17a6e6f 100644 --- a/odoo/exceptions.py +++ b/odoo/exceptions.py @@ -47,9 +47,11 @@ class RedirectWarning(Exception): :param int action_id: id of the action where to perform the redirection :param str button_text: text to put on the button that will trigger the redirection. + :param dict additional_context: parameter passed to action_id. + Can be used to limit a view to active_ids for example. """ - def __init__(self, message, action, button_text): - super().__init__(message, action, button_text) + def __init__(self, message, action, button_text, additional_context=None): + super().__init__(message, action, button_text, additional_context) # using this RedirectWarning won't crash if used as an UserError @property