changeset fb7c6e651275 in tryton:4.4 details: https://hg.tryton.org/tryton?cmd=changeset;node=fb7c6e651275 description: Clean active_* keys from context when executing an action
As the values may be already present on the context they should be cleared in order to correctly evaluate action domains issue7839 review68381002 (grafted from b5a32fb596ffaf5ede73e0c34b339f5990547440) diffstat: tryton/action/main.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diffs (23 lines): diff -r d51018e5f637 -r fb7c6e651275 tryton/action/main.py --- a/tryton/action/main.py Wed Feb 20 12:04:00 2019 +0100 +++ b/tryton/action/main.py Fri Feb 22 19:35:46 2019 +0100 @@ -77,6 +77,8 @@ def _exec_action(action, data=None, context=None): if context is None: context = {} + else: + context = context.copy() if data is None: data = {} else: @@ -84,6 +86,10 @@ if 'type' not in (action or {}): return + context.pop('active_id', None) + context.pop('active_ids', None) + context.pop('active_model', None) + def add_name_suffix(name): if not data.get('ids') or not data.get('model'): return name