Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Tests failure when invoicing is involved after a change in Odoo upstream

by
Tecnativa. S. L., Pedro M. Baeza
- 25/02/2025 15:39:24
I write to inform you that Odoo has performed a change in "stable" 16.0 in this commit:


that is affecting CIs, specially on those integration ones that OCA implementers perform combining all the modules of a specific instance.

This change avoids the auto-install of one CoA on the existing demo main company, as it doesn't comply with a country CoA unless you have l10n_us installed. Some tests inheriting from  AccountTestInvoicingCommon won't fail if l10n_generic_coa is installed, but it's also a requirement that can't always be fulfilled.

The impact of this is huge across OCA, as basically every test creating an invoice is affected. OCA CI may not be red, but use it in other place and you may be doomed.


Thus, from Tecnativa, we have started a massive pull request campaign fixing most of the common modules with this problem.

The strategy has been to force a load of the generic CoA or the first existing one into the main company if starting the test, it doesn't have any. Check the minimum example at:


If you are inheriting from AccountTestInvoicingCommon, the strategy should be different. By default, you won't have a red CI, but the tests are skipped, which is also undesirable. Thus, you have to do the work before calling super. Check an example here:


v17 is not affected for now. Let's hope it continues this way...

Regards.

Follow-Ups