bzr revid: fp@tinyerp.com-20081209143720-crwf3n3esq54400n
This commit is contained in:
Fabien Pinckaers 2008-12-09 15:37:20 +01:00
parent 549458e053
commit 6b47dd274a
1 changed files with 7 additions and 6 deletions

View File

@ -424,6 +424,13 @@ def load_module_graph(cr, graph, status=None, **kwargs):
statusi = 0
pool = pooler.get_pool(cr.dbname)
# only if update
register_class('base')
pool.instanciate('base', cr)
modobj = pool.get('ir.module.module')
modobj.update_list(cr, 1)
# update the graph with values from the database (if exist)
## First, we set the default values for each package in graph
additional_data = dict.fromkeys([p.name for p in graph], {'id': 0, 'state': 'uninstalled', 'dbdemo': False, 'latest_version': None})
@ -442,12 +449,6 @@ def load_module_graph(cr, graph, status=None, **kwargs):
migrations = MigrationManager(cr, graph)
# only if update
register_class('base')
pool.instanciate('base', cr)
modobj = pool.get('ir.module.module')
modobj.update_list(cr, 1)
mids = modobj.search(cr, 1, [('state','=','installed')])
for m in modobj.browse(cr, 1, mids):
for dep in m.dependencies_id: