After the recent change to make module install
atomically (code *and* data), we ran into issues
when installing a new module indirectly triggers
code of a not-yet-loaded-but-installed module,
via its data that is already in the database
(e.g. worflows or reports modified by this module
within another module, that now refer to its
code).
To avoid this, we now make sure that we only
install new modules on top of a consistent system
(code *and* data), by loading all installed or
'to upgrade' modules *before* starting to install
new ones.
lp bug: https://launchpad.net/bugs/809168 fixed
bzr revid: odo@openerp.com-20110712133343-unf610k23fa6d3pk
- removed unnecessary call to openerp.modules.db.initialize() in openerp/service/web_services.py
as the pooler.restart_pool() call just next after is already doing it.
- made the try/finally section bigger in openerp/modules/loading.py, to inlcude
the first cr.execute.
- abstracted the test to check if a database is initialized.
- removed unnecessary "if cr:" as the cr is nevertheless used after that.
bzr revid: vmt@openerp.com-20110517091822-pjtw6sc1s5assbr5