[FIX] Run tests for modules with auto_install=True (Odoo >= 19.0)#116
Open
ivantodorovich wants to merge 1 commit intoOCA:masterfrom
Open
[FIX] Run tests for modules with auto_install=True (Odoo >= 19.0)#116ivantodorovich wants to merge 1 commit intoOCA:masterfrom
ivantodorovich wants to merge 1 commit intoOCA:masterfrom
Conversation
In Odoo 19.0+, the behavior of `odoo -i <module-name>` changed: it no longer re-installs modules that are already installed in the database. This creates a problem for testing auto-installable modules. Here's the sequence: 1. During database initialization, we install all dependencies of the addons to test using `odoo -i <dependencies>` 2. Auto-installable modules get automatically installed at this step because their dependencies are now satisfied 3. Later, when we run tests with `odoo -i <auto-installable-module>`, Odoo sees the module is already installed and skips the installation process 4. Since the module installation is skipped, its unit tests are never executed The fix ensures that auto-installable modules are properly excluded during the initial database setup, so they can be explicitly installed (and tested) during the test execution phase. To achieve this, we leverage the newly added `skip-auto-install` parameter for Odoo 19.0+. Fixes OCA#115
Member
|
That's when I regret to have used bash :) |
gurneyalex
approved these changes
Jan 28, 2026
|
This PR has the |
SilvioC2C
approved these changes
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Odoo 19.0+, the behavior of
odoo -i <module-name>changed: it no longer re-installs modules that are already installed in the database.This creates a problem for testing auto-installable modules. Here's the sequence:
odoo -i <dependencies>odoo -i <auto-installable-module>, Odoo sees the module is already installed and skips the installation processThe fix ensures that auto-installable modules are properly excluded during the initial database setup, so they can be explicitly installed (and tested) during the test execution phase.
To achieve this, we leverage the newly added
skip-auto-installparameter for Odoo 19.0+.Fixes #115