diff options
| author | Rifakat <rha@tinyerp.com> | 2013-06-13 15:13:30 +0530 |
|---|---|---|
| committer | Rifakat <rha@tinyerp.com> | 2013-06-13 15:13:30 +0530 |
| commit | 1dceb70f3bf281f44cc746263a9a00a0fb6de2d8 (patch) | |
| tree | e2df37d5641dc2b5fb67cc35c17b179e39bfe7a1 | |
| parent | bbbb085e5ddc3910f299fe91d302c4e825f21252 (diff) | |
[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
| -rw-r--r-- | addons/account/account.py | 5 |
1 files changed, 4 insertions, 1 deletions
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): |
