[FIX] account: add id to order of tax groups

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) <jbw@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
This commit is contained in:
Gauthier Wala (gawa)
2023-10-17 10:05:54 +00:00
parent f27604fdac
commit a8e6bd7cd6
+1 -1
View File
@@ -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