Skip to content

Comments

[18.0][IMP] product_set: Change where the mock has to be loaded#2218

Merged
OCA-git-bot merged 3 commits intoOCA:18.0from
Tecnativa:18.0-fix-product_set-tests
Feb 20, 2026
Merged

[18.0][IMP] product_set: Change where the mock has to be loaded#2218
OCA-git-bot merged 3 commits intoOCA:18.0from
Tecnativa:18.0-fix-product_set-tests

Conversation

@victoralmau
Copy link
Member

Change where the mock has to be loaded

With the changes introduced in odoo/odoo@de056cc#diff-b37c7fd5520c97a29ddc59495779e7be61a66e15e85603928e27b3affb9dc31f, an error was occurring because the change validation on the model was being performed before tearDownClass was executed. Therefore, it has been modified so that the mock changes are applied in each test and cleaned up after each test. This way, the error will no longer appear and the test will run normally.

@Tecnativa

With the changes introduced in odoo/odoo@de056cc#diff-b37c7fd5520c97a29ddc59495779e7be61a66e15e85603928e27b3affb9dc31f, an error was occurring because the change validation on the model was being performed before tearDownClass was executed. Therefore, it has been modified so that the mock changes are applied in each test and cleaned up after each test. This way, the error will no longer appear and the test will run normally.
@pedrobaeza pedrobaeza added this to the 18.0 milestone Feb 20, 2026
…oaded

With the changes introduced in odoo/odoo@de056cc#diff-b37c7fd5520c97a29ddc59495779e7be61a66e15e85603928e27b3affb9dc31f, an error was occurring because the change validation on the model was being performed before tearDownClass was executed. Therefore, it has been modified so that the mock changes are applied in each test and cleaned up after each test. This way, the error will no longer appear and the test will run normally.
With the changes introduced in odoo/odoo@de056cc#diff-b37c7fd5520c97a29ddc59495779e7be61a66e15e85603928e27b3affb9dc31f, an error was occurring because the change validation on the model was being performed before tearDownClass was executed. Therefore, it has been modified so that the mock changes are applied in each test and cleaned up after each test. This way, the error will no longer appear and the test will run normally.
@victoralmau victoralmau marked this pull request as ready for review February 20, 2026 14:46
@CRogos
Copy link

CRogos commented Feb 20, 2026

is this still necessary or solved by this? OCA/odoo-test-helper#39

@pedrobaeza
Copy link
Member

Yes, it's needed, as that's only mitigating one thing, but the problem is in Odoo core, and it requires to change all the tests using the library.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-2218-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 8a9a67d into OCA:18.0 Feb 20, 2026
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 54bf488. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 18.0-fix-product_set-tests branch February 20, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants