From 1dceb70f3bf281f44cc746263a9a00a0fb6de2d8 Mon Sep 17 00:00:00 2001 From: Rifakat Date: Thu, 13 Jun 2013 15:13:30 +0530 Subject: [PATCH] [FIX] account: if tax is , total base is applied only on the main tax and does not carry the child tax amount into base, it is compulsory to add child tax amount to tax base becuase the next tax i.e. VAT is applied on total tax base amount --- addons/account/account.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index c2e75e889f0..418a4f7b161 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2088,12 +2088,15 @@ class account_tax(osv.osv): data['balance'] = cur_price_unit amount2 = data.get('amount', 0.0) + amount3 = 0.0 if tax.child_ids: if tax.child_depend: latest = res.pop() amount = amount2 child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, product, partner, quantity) res.extend(child_tax) + for child in child_tax: + amount3 += child.get('amount', 0.0) if tax.child_depend: for r in res: for name in ('base','ref_base'): @@ -2109,7 +2112,7 @@ class account_tax(osv.osv): r['amount'] = data['amount'] latest[name+'_code_id'] = False if tax.include_base_amount: - cur_price_unit+=amount2 + cur_price_unit += amount2 + amount3 return res def compute_all(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, force_excluded=False):