From 33c2d98ce05289b4c16409254305c5bb047ef52e 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 (transplanted from 84191cf1b798e850171076caadc394e4549ad291) --- invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index bb3dacbbbd..a8bda5c5dd 100644 --- a/invoice.py +++ b/invoice.py @@ -384,6 +384,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): def _on_change_lines_taxes(self, vals): currency_obj = Pool().get('currency.currency') tax_obj = Pool().get('account.tax') + invoice_tax_obj = Pool().get('account.invoice.tax') res = { 'untaxed_amount': Decimal('0.0'), 'tax_amount': Decimal('0.0'), @@ -459,7 +460,8 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): if key not in tax_keys: res['tax_amount'] += computed_taxes[key]['amount'] res['taxes'].setdefault('add', []) - value = tax_obj.default_get(tax_obj._columns.keys()) + value = invoice_tax_obj.default_get( + invoice_tax_obj._columns.keys()) value.update(computed_taxes[key]) res['taxes']['add'].append(value) if currency: