[FIX] menu loading after immediate install of modules
authorChristophe Simonis <chs@openerp.com>
Tue, 13 Dec 2011 15:12:07 +0000 (16:12 +0100)
committerChristophe Simonis <chs@openerp.com>
Tue, 13 Dec 2011 15:12:07 +0000 (16:12 +0100)
bzr revid: chs@openerp.com-20111213151207-hj7xnc5980ahvv2i

openerp/addons/base/module/module.py

index fc72880..54685c1 100644 (file)
@@ -331,8 +331,8 @@ class module(osv.osv):
         cr.commit()
         db, pool = pooler.restart_pool(cr.dbname, update_module=True)
 
-        config = pool.get('res.config').next(cr, uid, [], context=context)
-        if config:
+        config = pool.get('res.config').next(cr, uid, [], context=context) or {}
+        if config.get('type') not in ('ir.actions.reload', 'ir.actions.act_window_close'):
             return config
 
         menu_ids = self.root_menus(cr,uid,ids,context)