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
        
            Opener B.V., Stefan Rijnhart
        
        
        
    
        
        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:
    
    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
Reference
- 
                Tests failure when invoicing is involved after a change in Odoo upstreambyTecnativa. S. L., Pedro M. Baeza- 25/02/2025 15:39:24 - 0- 
                Re: Tests failure when invoicing is involved after a change in Odoo upstreambyTecnativa. S. L., Pedro M. Baeza- 12/03/2025 17:02:57 - 0
- 
                Re: Tests failure when invoicing is involved after a change in Odoo upstreambyAcsone SA/NV, Stéphane Bidoul- 12/03/2025 16:08:54 - 0
- 
                Re: Tests failure when invoicing is involved after a change in Odoo upstreambyAcsone SA/NV, Stéphane Bidoul- 28/02/2025 19:33:28 - 0
- 
                Re: Tests failure when invoicing is involved after a change in Odoo upstreambyTecnativa. S. L., Pedro M. Baeza- 26/02/2025 16:46:41 - 0
- 
                Re: Tests failure when invoicing is involved after a change in Odoo upstreambyAcsone SA/NV, Denis Roussel- 26/02/2025 16:19:50 - 0
- 
                Re: Tests failure when invoicing is involved after a change in Odoo upstreambyOpener B.V., Stefan Rijnhart- 26/02/2025 11:22:35 - 0
- 
                Re: Tests failure when invoicing is involved after a change in Odoo upstreambySergio Corato- 25/02/2025 17:14:07 - 0
 
-