From 0a5fbeb82ef314ad2b786eabd859b5eb4c35aabe Mon Sep 17 00:00:00 2001 From: Alexis de Lattre <> Date: Wed, 3 Oct 2012 16:09:19 +0530 Subject: [PATCH] [FIX] account: corrected tax base amount calculation It first rounds base value and then multiplies with the qty which leads to wrong calculation lp bug: https://launchpad.net/bugs/1058390 fixed bzr revid: rha@tinyerp.com-20121003103919-slne7ppo75k9478m --- addons/account/account_invoice.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 503e1443562..f42403fa00c 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1586,14 +1586,13 @@ class account_invoice_tax(osv.osv): for line in inv.invoice_line: for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, inv.address_invoice_id.id, line.product_id, inv.partner_id)['taxes']: - tax['price_unit'] = cur_obj.round(cr, uid, cur, tax['price_unit']) val={} val['invoice_id'] = inv.id val['name'] = tax['name'] val['amount'] = tax['amount'] val['manual'] = False val['sequence'] = tax['sequence'] - val['base'] = tax['price_unit'] * line['quantity'] + val['base'] = cur_obj.round(cr, uid, cur, tax['price_unit'] * line['quantity']) if inv.type in ('out_invoice','in_invoice'): val['base_code_id'] = tax['base_code_id']