From 2faddc34edc74aae756c1fed32dbe6a98ef80948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 23 Feb 2013 17:40:40 +0100 Subject: [PATCH] Fix default value of account.invoice.tax review662003 --- invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 295d08590e..caae4fc14a 100644 --- a/invoice.py +++ b/invoice.py @@ -410,6 +410,7 @@ class Invoice(Workflow, ModelSQL, ModelView): def _on_change_lines_taxes(self): pool = Pool() Tax = pool.get('account.tax') + InvoiceTax = pool.get('account.invoice.tax') Account = pool.get('account.account') TaxCode = pool.get('account.tax.code') res = { @@ -485,7 +486,7 @@ class Invoice(Workflow, ModelSQL, ModelView): if key not in tax_keys: res['tax_amount'] += computed_taxes[key]['amount'] res['taxes'].setdefault('add', []) - value = Tax.default_get(Tax._fields.keys()) + value = InvoiceTax.default_get(InvoiceTax._fields.keys()) value.update(computed_taxes[key]) for field, Target in ( ('account', Account),