summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorDenis Ledoux <dle@openerp.com>2013-12-18 12:24:16 +0100
committerDenis Ledoux <dle@openerp.com>2013-12-18 12:24:16 +0100
commitcb0074ab15efd5e98ca0472ec66a8a89fef42719 (patch)
tree8d389dc4d13e06ef31872236d3da8f679aa7c7aa /addons/web/static/src/js
parent7486095918078b8176393099918dea983de4c3a9 (diff)
[FIX] web: context propagation was broken on buttons of action and object type.
The context on the button must be propagated to the resulting action bzr revid: dle@openerp.com-20131218112416-2vtaq442qo8opq4u
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 1d7ed406378..c9584002472 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -1364,10 +1364,11 @@ instance.web.View = instance.web.Widget.extend({
// Wrong default_* and search_default_* values will no give the expected result
// Wrong group_by values will simply fail and forbid rendering of the destination view
var ncontext = new instance.web.CompoundContext(
- _.object(_.reject(_.pairs(context.eval()), function(pair) {
+ _.object(_.reject(_.pairs(dataset.get_context().eval()), function(pair) {
return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
}))
);
+ ncontext.add(action_data.context || {});
ncontext.add({active_model: dataset.model});
if (record_id) {
ncontext.add({