changeset f01ca278accd in sao:4.4
details: https://hg.tryton.org/sao?cmd=changeset;node=f01ca278accd
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 |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 4b066a2f5910 -r f01ca278accd src/action.js
--- a/src/action.js     Tue Feb 19 21:47:21 2019 +0100
+++ b/src/action.js     Fri Feb 22 19:35:30 2019 +0100
@@ -8,7 +8,7 @@
     };
 
     Sao.Action.exec_action = function(action, data, context) {
-        if (context === undefined) {
+        if (!context) {
             context = {};
         } else {
             context = jQuery.extend({}, context);
@@ -24,6 +24,11 @@
         } else {
             data = jQuery.extend({}, data);
         }
+
+        delete context.active_id;
+        delete context.active_ids;
+        delete context.active_model;
+
         function add_name_suffix(name){
             if (!data.model || !data.ids) {
                 return jQuery.when(name);

Reply via email to