[FIX] loading: always process auto-installed modules for new databases
authorOlivier Dony <odo@openerp.com>
Wed, 17 Sep 2014 13:09:55 +0000 (15:09 +0200)
committerOlivier Dony <odo@openerp.com>
Wed, 17 Sep 2014 13:11:01 +0000 (15:11 +0200)
If the server was started without -i or -u and
happened to initialize a fresh database,
auto-installed modules that depend
on `base` only would stay in status "to install"
without actually being installed (until the next
installation round was triggered).
This was of little consequence in 7.0, but causes
a crash in 8.0.

Fixes #953

openerp/modules/loading.py

index 6112ef0..5ee4029 100644 (file)
@@ -277,6 +277,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
         if not openerp.modules.db.is_initialized(cr):
             _logger.info("init db")
             openerp.modules.db.initialize(cr)
+            update_module = True # process auto-installed modules
             tools.config["init"]["all"] = 1
             tools.config['update']['all'] = 1
             if not tools.config['without_demo']: