changeset 969996f0a4aa in sao:4.8
details: https://hg.tryton.org/sao?cmd=changeset;node=969996f0a4aa
description:
        Use group _context to avoid leaking session context

        When launching a new action, the context should not contain the session
        context because it is automatically appended to the evaluation.
        When creating a new group when the context model changed, it should not
        contain the session context neither.

        issue8312
        review267301002
        (grafted from fb90082bd482bc2dd32c28a5d8e0e6682ca0ccfa)
diffstat:

 src/screen.js |  3 ++-
 src/tab.js    |  2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r ca61c16faaaa -r 969996f0a4aa src/screen.js
--- a/src/screen.js     Mon May 13 22:38:11 2019 +0200
+++ b/src/screen.js     Thu May 02 12:49:12 2019 +0200
@@ -866,7 +866,8 @@
                     this.context_screen.display(true);
                     return jQuery.when();
                 }
-                this.new_group(jQuery.extend(this.context(),
+                this.new_group(jQuery.extend({},
+                    this.group._context,
                     this.context_screen.get_on_change_value()));
             }
 
diff -r ca61c16faaaa -r 969996f0a4aa src/tab.js
--- a/src/tab.js        Mon May 13 22:38:11 2019 +0200
+++ b/src/tab.js        Thu May 02 12:49:12 2019 +0200
@@ -562,7 +562,7 @@
                                     ids: record_ids
                                 };
                                 Sao.Action.exec_action(exec_action, data,
-                                    screen.context());
+                                    jQuery.extend({}, screen.group._context));
                             });
                         })
                         .appendTo(menu);

Reply via email to