Fix default value of account.invoice.tax

review662003
(transplanted from 84191cf1b798e850171076caadc394e4549ad291)
This commit is contained in:
Cédric Krier committed 2013-02-23 17:40:40 +01:00
1 parent 40ce44222f
commit 33c2d98ce0
1 file changed
+3 -1
+3 -1
View File
@@ -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: