diff --git a/addons/account/models/account.py b/addons/account/models/account.py
index 1b21e3d0c2b33e631abaf9de765aef0061a3fea8..d0b770c1df96c1252c91c765fcb16e36deb89593 100644
--- a/addons/account/models/account.py
+++ b/addons/account/models/account.py
@@ -639,7 +639,7 @@ class AccountTax(models.Model):
             prec += 5
         total_excluded = total_included = base = round(price_unit * quantity, prec)
 
-        for tax in self:
+        for tax in self.sorted():
             if tax.amount_type == 'group':
                 ret = tax.children_tax_ids.compute_all(price_unit, currency, quantity, product, partner)
                 total_excluded = ret['total_excluded']