openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00138
[Merge] lp:~openerp-canada/openobject-addons/lp667920 into lp:openobject-addons
Maxime Chambreuil (http://www.savoirfairelinux.com) has proposed merging lp:~openerp-canada/openobject-addons/lp667920 into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
#667920 [6.0RC1] Children tax calculation "included in base amount"
https://bugs.launchpad.net/bugs/667920
Fix bug lp:667920
--
https://code.launchpad.net/~openerp-canada/openobject-addons/lp667920/+merge/40595
Your team OpenERP Community is subscribed to branch lp:~openerp-canada/openobject-addons/lp667920.
=== modified file 'account/account.py'
--- account/account.py 2010-11-10 08:20:11 +0000
+++ account/account.py 2010-11-11 02:32:55 +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'