[FIX] dbmanager reload on creation
The board.board bug, avoid running code from the previous database as it is automatically loaded when it's the first db. Hide lonely topbar menu item. bzr revid: al@openerp.com-20120821171205-od6r63cxs13aavuy
This commit is contained in:
@@ -411,7 +411,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
|
||||
'login': 'admin',
|
||||
'password': form_obj['create_admin_pwd'],
|
||||
'login_successful': function() {
|
||||
instance.webclient.show_application();
|
||||
self.do_action("reload");
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -712,6 +712,11 @@ instance.web.Menu = instance.web.Widget.extend({
|
||||
this.data = data;
|
||||
this.renderElement();
|
||||
this.limit_entries();
|
||||
// Hide toplevel item if there is only one
|
||||
var $toplevel = this.$("li")
|
||||
if($toplevel.length == 1) {
|
||||
$toplevel.hide();
|
||||
}
|
||||
this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this }));
|
||||
this.$element.on('click', 'a[data-menu]', this.on_menu_click);
|
||||
// Hide second level submenus
|
||||
|
||||
Reference in New Issue
Block a user