odoo/odoo#239425

Created by fw-bot
Merged at 0ad94f820f4c0a35efe496e0c05bc6d0f43fd2d5

Statuses:

Linked pull requests
label
odoo-dev:19.0-17.0-allow-to-disable-autoinstall-xdo-483407-fw
head
388e070863e35fec1ac3706df6c9762f6b52de57
merged
1 month ago by Framework (ORM), Xavier Dollé (xdo)
odoo/odoo odoo/documentation
17.0 #234710 #15546
18.0 #238685 #15570
saas-18.2 #239044 #15590
saas-18.3 #239422 #15620
saas-18.4 #239423 #15621
19.0 #239425 #15622
saas-19.1
master #239427 #15623

[IMP] base: allow to disable autoinstall through command line

In some case, a database can be in a state where some auto install module are not installed
- when the user uninstall a module
- when module was added in stable and a database was created before the addition.

It can lead to issues where an upgrade fails or some business logic does not work as expected because of the missing modules.

This is not easy to reproduce and to test, even if uninstalling such module should in theory work and be tested.

This pr proposes to add a flag "--skip-auto-install" to the config to be able to disable all auto install of modules.

It is open to discussion to change this to a config option, with or without a module list

Initial solution (alternative to avoid a config)
--dev skipautoinstall

Current solutions
(command line param)
--skip-auto-install

Maybe in the future but unlikely
(more flexible)
--skip-auto-install=all
--skip-auto-install=web_enterprise,iap

(krma suggestions)
--skip-auto-install=
--skip-auto-install=web_
,iap

Those two last one could be more flexible but the use case are limited and can be done another way with an explicit -i, maybe no worth the additional complexity (mainly since we need to filter in two different places)

Note that this pr uses get on the config just in case the config is monkey patched somewhere to make it more robust.

Forward-Port-Of: #239044
Forward-Port-Of: #234710