diff --git a/CHANGELOG b/CHANGELOG index b463934bd3..e4264cdf09 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Use tax sequence as default value for invoice taxes sequence * Add party tax identifier on invoice Version 4.4.0 - 2017-05-01 diff --git a/invoice.py b/invoice.py index 3a037ab236..4b4f53914f 100644 --- a/invoice.py +++ b/invoice.py @@ -556,7 +556,10 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin): self.tax_amount += computed_taxes[key]['amount'] value = InvoiceTax.default_get(InvoiceTax._fields.keys()) value.update(computed_taxes[key]) - taxes.append(InvoiceTax(**value)) + invoice_tax = InvoiceTax(**value) + if invoice_tax.tax: + invoice_tax.sequence = invoice_tax.tax.sequence + taxes.append(invoice_tax) self.taxes = taxes if self.currency: self.untaxed_amount = self.currency.round(self.untaxed_amount)