summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/view_tree.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-11-26 15:05:25 +0100
committerXavier Morel <xmo@openerp.com>2012-11-26 15:05:25 +0100
commit4a5cb1ebc478cb650a2bf33081f101e4f74bc6fe (patch)
treed439fb62effd89c2e31f9bf238c024e6b36625b2 /addons/web/static/src/js/view_tree.js
parenteb9a1c7d55bf4b07b5e516698a3b96a3f9f43d5b (diff)
[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
Diffstat (limited to 'addons/web/static/src/js/view_tree.js')
-rw-r--r--addons/web/static/src/js/view_tree.js8
1 files changed, 5 insertions, 3 deletions
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];