From 709f2506ff40d799aada58df74dd78522d965868 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 23 Nov 2012 12:39:32 +0100 Subject: [REM] server-side eval_domain_and_context bzr revid: xmo@openerp.com-20121123113932-siz0u2vp2u7z6wk2 --- addons/web/static/src/js/view_tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/view_tree.js') diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js index 8265be77ba1..8fd3b25ade5 100644 --- a/addons/web/static/src/js/view_tree.js +++ b/addons/web/static/src/js/view_tree.js @@ -236,7 +236,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie if (action.context) { c.add(action.context); } - return self.rpc('/web/session/eval_domain_and_context', { + return instance.web.pyeval.eval_domains_and_contexts({ contexts: [c], domains: [] }).then(function (res) { action.context = res.context; -- cgit v1.2.3 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/view_tree.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src/js/view_tree.js') diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js index 8fd3b25ade5..4d08da385fd 100644 --- a/addons/web/static/src/js/view_tree.js +++ b/addons/web/static/src/js/view_tree.js @@ -44,7 +44,8 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie view_id: this.view_id, view_type: "tree", toolbar: this.view_manager ? !!this.view_manager.sidebar : false, - context: this.dataset.get_context() + context: instance.web.pyeval.eval( + 'context', this.dataset.get_context()) }).done(this.on_loaded); }, /** @@ -227,8 +228,9 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie return this.rpc('/web/treeview/action', { id: id, model: this.dataset.model, - context: new instance.web.CompoundContext( - this.dataset.get_context(), local_context) + context: instance.web.pyeval.eval( + 'context', new instance.web.CompoundContext( + this.dataset.get_context(), local_context)) }).then(function (actions) { if (!actions.length) { return; } var action = actions[0][2]; -- cgit v1.2.3