summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views.js
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2013-06-10 17:45:14 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2013-06-10 17:45:14 +0200
commita94bbf8e5e3aafb236a059f82b855d16dc033d9e (patch)
tree0b3f2cfa795a23150a10d561996052a023fd48f5 /addons/web/static/src/js/views.js
parent901ba0cba5ea8413ea5cb64974ce8fc973093105 (diff)
parent02aa3f211471a55fd956027a84b6baca1272ffa1 (diff)
[FIX] Merge fix in saas1 for the problem that made the server crash when install a db
bzr revid: nicolas.vanhoren@openerp.com-20130610144915-0nj8vpk7n84ocj3f bzr revid: nicolas.vanhoren@openerp.com-20130610150657-3xddn91gm0iq0ubp bzr revid: nicolas.vanhoren@openerp.com-20130610154514-oee6s4f9g17bx63z
Diffstat (limited to 'addons/web/static/src/js/views.js')
-rw-r--r--addons/web/static/src/js/views.js9
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,