[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:
parent
f654a7719b
commit
239144d519
|
@ -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(){
|
||||
|
|
Loading…
Reference in New Issue