[FIX] when executing action received from a button call, set active_id and active_ids...
authorChristophe Simonis <chs@openerp.com>
Wed, 11 Dec 2013 16:36:09 +0000 (17:36 +0100)
committerChristophe Simonis <chs@openerp.com>
Wed, 11 Dec 2013 16:36:09 +0000 (17:36 +0100)
bzr revid: chs@openerp.com-20131211163609-i3s2mlncf5n91uda

addons/web/static/src/js/views.js

index 517a6ce..1d7ed40 100644 (file)
@@ -1365,14 +1365,14 @@ instance.web.View = instance.web.Widget.extend({
                 // 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) {
-                      return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf)$') !== null;
+                      return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
                     }))
                 );
+                ncontext.add({active_model: dataset.model});
                 if (record_id) {
                     ncontext.add({
                         active_id: record_id,
                         active_ids: [record_id],
-                        active_model: dataset.model
                     });
                 }
                 ncontext.add(action.context || {});