diff options
Diffstat (limited to 'addons/web/static/src/js/views.js')
| -rw-r--r-- | addons/web/static/src/js/views.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index efd5f890544..9fad16a58b0 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -265,6 +265,17 @@ instance.web.ActionManager = instance.web.Widget.extend({ return self.do_action(result, options); }); } + + // Ensure context & domain are evaluated and can be manipulated/used + if (action.context) { + action.context = instance.web.pyeval.eval( + 'context', action.context); + } + if (action.domain) { + action.domain = instance.web.pyeval.eval( + 'domain', action.domain); + } + if (!action.type) { console.error("No type for action", action); return $.Deferred().reject(); @@ -1081,7 +1092,8 @@ instance.web.Sidebar = instance.web.Widget.extend({ context: instance.web.pyeval.eval( 'context', additional_context) }).done(function(result) { - result.context = _.extend(result.context || {}, + result.context = new instance.web.CompoundContext( + result.context, additional_context); result.flags = result.flags || {}; result.flags.new_window = true; |
