diff options
Diffstat (limited to 'addons/web/static/src/js/views.js')
| -rw-r--r-- | addons/web/static/src/js/views.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 0737281e199..fdb2eeee329 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -522,6 +522,7 @@ instance.web.ViewManager = instance.web.Widget.extend({ return x; } }); + this.ActionManager = parent; this.views = {}; this.flags = flags || {}; this.registry = instance.web.views; @@ -1253,6 +1254,7 @@ instance.web.View = instance.web.Widget.extend({ view_type: undefined, init: function(parent, dataset, view_id, options) { this._super(parent); + this.ViewManager = parent; this.dataset = dataset; this.view_id = view_id; this.set_default_options(options); @@ -1324,7 +1326,6 @@ instance.web.View = instance.web.Widget.extend({ } }; var context = new instance.web.CompoundContext(dataset.get_context(), action_data.context || {}); - var handler = function (action) { if (action && action.constructor == Object) { var ncontext = new instance.web.CompoundContext(context); @@ -1361,7 +1362,11 @@ instance.web.View = instance.web.Widget.extend({ } } args.push(context); - return dataset.call_button(action_data.name, args).then(handler); + return dataset.call_button(action_data.name, args).then(handler).then(function () { + if (self.ViewManager.ActionManager) { + self.ViewManager.ActionManager.__parentedParent.menu.do_reload_needaction(); + } + }); } else if (action_data.type=="action") { return this.rpc('/web/action/load', { action_id: action_data.name, |
