From 4a5cb1ebc478cb650a2bf33081f101e4f74bc6fe Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 26 Nov 2012 15:05:25 +0100 Subject: [REM] EVALPOCALYPSE PART 2: no more python-side eval trigger an error if a nonliteral context is pushed to the server (through a new object_hook) bzr revid: xmo@openerp.com-20121126140525-ni2x5m56upss610b --- addons/web/static/src/js/chrome.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src/js/chrome.js') diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 2cca57f0b56..77d23d8fa53 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1191,11 +1191,12 @@ instance.web.WebClient = instance.web.Client.extend({ var self = this; return this.rpc("/web/action/load", { action_id: options.action_id }) .then(function (result) { - var action = result; if (options.needaction) { - action.context.search_default_message_unread = true; + result.context = new instance.web.CompoundContext( + result.context, + {search_default_message_unread: true}); } - return $.when(self.action_manager.do_action(action, { + return $.when(self.action_manager.do_action(result, { clear_breadcrumbs: true, action_menu_id: self.menu.current_menu, })).fail(function() { -- cgit v1.2.3