summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/view_tree.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/view_tree.js')
-rw-r--r--addons/web/static/src/js/view_tree.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js
index 1c6694ed930..6039e4a0822 100644
--- a/addons/web/static/src/js/view_tree.js
+++ b/addons/web/static/src/js/view_tree.js
@@ -224,21 +224,25 @@ openerp.web.TreeView = openerp.web.View.extend(/** @lends openerp.web.TreeView#
active_model: self.dataset.model,
active_id: id,
active_ids: [id]};
- this.rpc('/web/treeview/action', {
+ return this.rpc('/web/treeview/action', {
id: id,
model: this.dataset.model,
context: new openerp.web.CompoundContext(
this.dataset.get_context(), local_context)
- }, function (actions) {
+ }).pipe(function (actions) {
if (!actions.length) { return; }
var action = actions[0][2];
var c = new openerp.web.CompoundContext(local_context);
if (action.context) {
c.add(action.context);
}
- action.context = c;
- self.do_action(action);
- });
+ return self.rpc('/web/session/eval_domain_and_context', {
+ contexts: [c], domains: []
+ }).pipe(function (res) {
+ action.context = res.context;
+ return self.do_action(action);
+ }, null);
+ }, null);
},
// show & hide the contents