openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00131
[Merge] lp:~openerp-canada/openobject-addons/lp667920 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3
Maxime Chambreuil (http://www.savoirfairelinux.com) has proposed merging lp:~openerp-canada/openobject-addons/lp667920 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
Requested reviews:
OpenERP R&D Team (openerp-dev)
Related bugs:
#667920 [6.0RC1] Children tax calculation "included in base amount"
https://bugs.launchpad.net/bugs/667920
--
https://code.launchpad.net/~openerp-canada/openobject-addons/lp667920/+merge/40254
Your team OpenERP Community is subscribed to branch lp:~openerp-canada/openobject-addons/lp667920.
=== modified file 'account/account.py'
--- account/account.py 2010-11-04 12:42:42 +0000
+++ account/account.py 2010-11-06 14:02:50 +0000
@@ -1843,7 +1843,10 @@
if tax.child_ids:
if tax.child_depend:
latest = res.pop()
- amount = amount2
+ if tax.include_base_amount:
+ amount = cur_price_unit + amount2
+ else:
+ amount = amount2
child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, address_id, product, partner, quantity)
res.extend(child_tax)
if tax.child_depend:
@@ -1860,8 +1863,6 @@
r[name+'_sign'] = latest[name+'_sign']
r['amount'] = data['amount']
latest[name+'_code_id'] = False
- if tax.include_base_amount:
- cur_price_unit+=amount2
return res
def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
=== modified file 'account/installer.py'