From 66dbb2502e8921a416df74bee39c2fdec2b6a9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2019 12:49:12 +0200 Subject: [PATCH] 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 --- src/screen.js | 3 ++- src/tab.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screen.js b/src/screen.js index 417490265b..3f4b487fbb 100644 --- a/src/screen.js +++ b/src/screen.js @@ -978,7 +978,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 --git a/src/tab.js b/src/tab.js index 91c978e594..a87b89c51b 100644 --- a/src/tab.js +++ b/src/tab.js @@ -644,7 +644,7 @@ ids: record_ids }; Sao.Action.exec_action(exec_action, data, - screen.context); + jQuery.extend({}, screen.group._context)); }); }.bind(this)) .appendTo(menu);