odoo/upgrade-util#140

Created by Upgrade, Jinane Maksoud (maji)
Closed
label
odoo-dev:master-force-install-new-modules-maji
head
f86a36f1e36ff756896ab4ef78c854bd018c243d
odoo/upgrade-util
master #140

[IMP] util/modules: force install of new modules

The method force_install_module only works when the module already exists in the database and changes its state immediately. For new modules this does not work unless the module is explicitly added, or we use the auto discovery methods instead.
A check _assert_modules_exists is also added to the force installation.

As a solution, the check for version is added to see if we can delay the force installation to post-base when the module is auto discovered, and the implementation is moved to _force_install_module. The calls for force_install_module are replaced in the following methods where the module is expected to exist:
- merge_module
- new_module_dep
- trigger_auto_install
- _trigger_auto_discovery