odoo/upgrade-util#140

Created by Upgrade, Jinane Maksoud (maji)

Blocked

label
odoo-dev:master-force-install-new-modules-maji
head
03c9ff41d5f24ecb2b9a1352c12c4102f92e60ba
odoo/upgrade-util
master #140 missing r+

[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