[FIX] handle correctly the '-i' command line switch

bzr revid: christophe@tinyerp.com-20081212105208-i5o9w28su9h9olzv
This commit is contained in:
Christophe Simonis 2008-12-12 11:52:08 +01:00
parent 2ded13c89e
commit 71ed4e9e9c
1 changed files with 3 additions and 2 deletions

View File

@ -539,8 +539,9 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
modobj = pool.get('ir.module.module')
modobj.update_list(cr, 1)
if tools.config['init']:
ids = modobj.search(cr, 1, ['&', ('state', '=', 'uninstalled'), ('name', 'in', tools.config['init'])])
mods = [k for k in tools.config['init'] if tools.config['init'][k]]
if mods:
ids = modobj.search(cr, 1, ['&', ('state', '=', 'uninstalled'), ('name', 'in', mods)])
if ids:
modobj.button_install(cr, 1, ids)