[FIX] mail: locate current menu using a safer method + check undefined case
bzr revid: odo@openerp.com-20130506133915-punpieubdyu1nxgl
This commit is contained in:
@@ -1709,7 +1709,10 @@ openerp.mail = function (session) {
|
||||
* contain the menu widget and the the sub menu related of this wall
|
||||
*/
|
||||
do_reload_menu_emails: function () {
|
||||
var menu = this.getParent().getParent().__parentedParent.menu || this.getParent().getParent().getParent().getParent().__parentedParent.menu;
|
||||
var menu = session.webclient.menu;
|
||||
if (!menu) {
|
||||
return $.when();
|
||||
}
|
||||
return menu.rpc("/web/menu/load_needaction", {'menu_ids': [menu.current_menu]}).done(function(r) {
|
||||
menu.on_needaction_loaded(r);
|
||||
}).then(function () {
|
||||
|
||||
Reference in New Issue
Block a user