diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-03-05 08:06:34 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-03-05 08:06:34 +0100 |
| commit | e178185b4fc600f8a612f3ef6027ebb85acef516 (patch) | |
| tree | 890d3a34c09b47f8237783c3a178f54242dfa5fd /addons/web/static/src/js/view_tree.js | |
| parent | a86051c04659d97bac7ad7773c3df4779d68bcb7 (diff) | |
| parent | 6468fc876a237da4550aa4a9b483f3eaaeba2ab8 (diff) | |
[MERGE] bug fixes form 6.1 branch
bzr revid: xmo@openerp.com-20120305070634-li0eloj7vhsljguu
Diffstat (limited to 'addons/web/static/src/js/view_tree.js')
| -rw-r--r-- | addons/web/static/src/js/view_tree.js | 14 |
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 |
