[FIX] web: when filtering out context, also strip *_view_ref keys
authorChristophe Simonis <chs@openerp.com>
Thu, 20 Mar 2014 13:10:14 +0000 (14:10 +0100)
committerChristophe Simonis <chs@openerp.com>
Thu, 20 Mar 2014 13:10:14 +0000 (14:10 +0100)
bzr revid: chs@openerp.com-20140320131014-3v5qfjxq9unqu5fs

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

index 2ec06bb..2db515f 100644 (file)
@@ -1365,7 +1365,7 @@ 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(dataset.get_context().eval()), function(pair) {
-                      return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
+                      return pair[0].match('^(?:(?:default_|search_default_).+|.+_view_ref|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
                     }))
                 );
                 ncontext.add(action_data.context || {});