changeset 84575cb34500 in sao:5.0 details: https://hg.tryton.org/sao?cmd=changeset;node=84575cb34500 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 f70f3f848279931e3f12a12f9ddf3e1461088706) diffstat: src/action.js | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diffs (27 lines): diff -r 64c0e998ea4e -r 84575cb34500 src/action.js --- a/src/action.js Wed Feb 13 10:25:09 2019 +0100 +++ b/src/action.js Fri Feb 22 19:35:30 2019 +0100 @@ -8,8 +8,10 @@ }; Sao.Action.exec_action = function(action, data, context) { - if (context === undefined) { + if (!context) { context = {}; + } else { + context = jQuery.extend({}, context); } var session = Sao.Session.current_session; if (data === undefined) { @@ -17,6 +19,11 @@ } else { data = jQuery.extend({}, data); } + + delete context.active_id; + delete context.active_ids; + delete context.active_model; + function add_name_suffix(name, context){ if (!data.model || !data.ids) { return jQuery.when(name);