[FIX] don't call /base/menu/action when the current menu does not have an id
bzr revid: xmo@openerp.com-20110325132351-tqzzmgqj9ldwzv54
This commit is contained in:
parent
47fa3b4a5f
commit
5294b046d9
|
@ -479,7 +479,11 @@ openerp.base.Menu = openerp.base.Controller.extend({
|
|||
this.$secondary_menu.find('.menu_accordion').hide();
|
||||
// TODO: ui-accordion : collapse submenus and expand the good one
|
||||
$secondary.show();
|
||||
this.rpc('/base/menu/action', {'menu_id': id}, this.on_menu_action_loaded);
|
||||
|
||||
if (id) {
|
||||
this.rpc('/base/menu/action', {'menu_id': id},
|
||||
this.on_menu_action_loaded);
|
||||
}
|
||||
|
||||
$('.active', this.$element.add(this.$secondary_menu)).removeClass('active');
|
||||
$parent.addClass('active');
|
||||
|
|
Loading…
Reference in New Issue