[FIX] addons: upgrade base module properly when --update=all is used

bzr revid: odo@openerp.com-20110113114200-8k9u3lg2nm56qzjs
This commit is contained in:
Olivier Dony 2011-01-13 12:42:00 +01:00
parent cf6a536fda
commit 6c3c49ece1
1 changed files with 2 additions and 2 deletions

View File

@ -822,8 +822,8 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
report = tools.assertion_report()
# NOTE: Try to also load the modules that have been marked as uninstallable previously...
STATES_TO_LOAD = ['installed', 'to upgrade', 'uninstallable']
if 'base' in tools.config['update']:
cr.execute("update ir_module_module set state=%s where name=%s", ('to upgrade', 'base'))
if 'base' in tools.config['update'] or 'all' in tools.config['update']:
cr.execute("update ir_module_module set state=%s where name=%s and state=%s", ('to upgrade', 'base', 'installed'))
# STEP 1: LOAD BASE (must be done before module dependencies can be computed for later steps)
graph = create_graph(cr, ['base'], force)