From a8e6bd7cd6b113e65f63af76a3ae09f3a0eddf08 Mon Sep 17 00:00:00 2001 From: "Gauthier Wala (gawa)" Date: Fri, 6 Oct 2023 09:09:56 +0000 Subject: [PATCH] [FIX] account: add id to order of tax groups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tax group are currently ordered by sequence only. Only 2 localizations of ours have defined the sequence on them. So, most of the tax groups have the same sequence. The order of search made on them is thus undeterministic. It can be seen when running the test test_generate_xml_sale with l10n_ee_reports installed, it fails sometimes (1 in 50 to 100). Because the invoice amounts are grouped and ordered by tax groups. Linked to runbot error 24595 closes odoo/odoo#138890 X-original-commit: 7535c6091cb841a428ea0f4cc6d4bb1779e70346 Signed-off-by: de Wouters de Bouchout Jean-BenoƮt (jbw) Signed-off-by: Wala Gauthier (gawa) --- addons/account/models/account_tax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_tax.py b/addons/account/models/account_tax.py index 65af6577f24..304d2fc07d3 100644 --- a/addons/account/models/account_tax.py +++ b/addons/account/models/account_tax.py @@ -21,7 +21,7 @@ TYPE_TAX_USE = [ class AccountTaxGroup(models.Model): _name = 'account.tax.group' _description = 'Tax Group' - _order = 'sequence asc' + _order = 'sequence asc, id' _check_company_auto = True _check_company_domain = models.check_company_domain_parent_of