[FIX] view_form: use the reference of menu from the instance, not from the widget ancestors

Fixes #1024: when using a formview on a non trivial way, the reference of the menu using the widget ancestors may be wrong
This commit is contained in:
Simon Lejeune 2014-07-11 11:51:54 +02:00
parent f654a7719b
commit 239144d519
1 changed files with 3 additions and 3 deletions

View File

@ -701,9 +701,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
self.trigger("save", result);
self.reload().then(function() {
self.to_view_mode();
var parent = self.ViewManager.ActionManager.getParent();
if(parent){
parent.menu.do_reload_needaction();
var menu = instance.webclient.menu;
if (menu) {
menu.do_reload_needaction();
}
});
}).always(function(){