Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Tests failure when invoicing is involved after a change in Odoo upstream
Re: Tests failure when invoicing is involved after a change in Odoo upstream
Re: Tests failure when invoicing is involved after a change in Odoo upstream
by
Acsone SA/NV, Denis Roussel
Thanks Pedro for pointing that out.
But as Stefan said, the changes you propose should be applied in particular modules that do pull particular localisation, not every.
As said also, a lead could be using AccountTestInvoicingCommon.
Moreover, I think proposing a hook in Odoo's tests should be great to lower the code we need to introduce in our modules, or... What do you think?
Thanks
Le mer. 26 févr. 2025, 11:27, Stefan Rijnhart <notifications@odoo-community.org> a écrit :
Yes, but the reason given by the Odoo devs for this change (https://github.com/odoo/odoo/pull/194799) is that CI can break on other CoAs than the generic one. That implies that it is considered bad practise to encourage it, and maybe we should not be doing this in (potentially, a lot of) OCA modules. Maybe using AccountTestInvoicingCommon is still the best solution?
Like you say, OCA CI should mostly not be affected because l10n_generic_coa is still installed automatically if you don't depend on a localized chart. Do you really *need* to test these modules on databases with l10n_es? Maybe you can enforce the installation of it on the main company with an extra step in your CI.
On 25-02-2025 15:42, Pedro M. Baeza wrote:
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.
You can see an example of red OCA CI in https://github.com/OCA/l10n-spain/actions/runs/13498660769/job/37711545908#step:8:228
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._______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
-- Opener B.V. - Business solutions driven by open source collaboration Stefan Rijnhart - Consultant/developer mail: stefan@opener.amsterdam tel: +31 (0) 6 1447 8606 web: https://opener.amsterdam_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Reference
-
Tests failure when invoicing is involved after a change in Odoo upstream
byTecnativa. S. L., Pedro M. Baeza-
Re: Tests failure when invoicing is involved after a change in Odoo upstream
byTecnativa. S. L., Pedro M. Baeza -
Re: Tests failure when invoicing is involved after a change in Odoo upstream
byAcsone SA/NV, Stéphane Bidoul -
Re: Tests failure when invoicing is involved after a change in Odoo upstream
byAcsone SA/NV, Stéphane Bidoul -
Re: Tests failure when invoicing is involved after a change in Odoo upstream
byTecnativa. S. L., Pedro M. Baeza -
Re: Tests failure when invoicing is involved after a change in Odoo upstream
byAcsone SA/NV, Denis Roussel -
Re: Tests failure when invoicing is involved after a change in Odoo upstream
byOpener B.V., Stefan Rijnhart -
Re: Tests failure when invoicing is involved after a change in Odoo upstream
bySergio Corato
-