From 6c36d5a37b3d232b0e88b6aafa831dbb54ec43df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 13 Apr 2012 13:21:47 +0200 Subject: [PATCH] Use default values when adding a record via on_change review321002 (transplanted from 5aed7d67f16d93bbaec69b8dd4ca3ca14b94ff6e) --- invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 865ee16e6c..bb3dacbbbd 100644 --- a/invoice.py +++ b/invoice.py @@ -459,7 +459,9 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): if key not in tax_keys: res['tax_amount'] += computed_taxes[key]['amount'] res['taxes'].setdefault('add', []) - res['taxes']['add'].append(computed_taxes[key]) + value = tax_obj.default_get(tax_obj._columns.keys()) + value.update(computed_taxes[key]) + res['taxes']['add'].append(value) if currency: res['untaxed_amount'] = currency_obj.round(currency, res['untaxed_amount'])