upgrade-util icon indicating copy to clipboard operation
upgrade-util copied to clipboard

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

Open jjmaksoud opened this issue 1 year ago • 3 comments

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

jjmaksoud avatar Sep 24 '24 08:09 jjmaksoud

Pull request status dashboard

robodoo avatar Sep 24 '24 08:09 robodoo

upgradeci retry with always only base

KangOl avatar Sep 24 '24 12:09 KangOl

@robodoo r-

On hold until some retro-compatibility questions are sorted out.

KangOl avatar Sep 26 '24 14:09 KangOl

Are retro-compatibility questions sorted out? this could have been useful here too https://github.com/odoo/upgrade/pull/8403

jjmaksoud avatar Sep 08 '25 12:09 jjmaksoud

Damn! I restarted handling this delay-to-autodiscovery with https://github.com/odoo/upgrade-util/compare/master...odoo-dev:upgrade-util:master-delay_force_install_module-chs

KangOl avatar Sep 08 '25 13:09 KangOl

well I also forgot about it ¯\_(ツ)_/¯

jjmaksoud avatar Sep 08 '25 14:09 jjmaksoud

closing in favor of https://github.com/odoo/upgrade-util/pull/315

jjmaksoud avatar Sep 11 '25 08:09 jjmaksoud