Dhruti Shastri has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-577466-dhs into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577466-dhs/+merge/118739
To Reproduce :
Create a Tax with two child taxes having below configuration:
child 1 : Percentage , 0.0020, Mark Boolean field labeled "Include in base
Amount" , sequence 1
child 2 : Percentage , 0.1960, sequence 2
"Tax on Children" should be True to compute based on Child Taxes.
Create an Invoice Line with amount 100. Tax is working fine(amount:19.84).
It shows wrong Amount in Base. Base Amount is calculated twice.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577466-dhs/+merge/118739
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-577466-dhs.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py 2012-07-04 16:33:07 +0000
+++ account/account_invoice.py 2012-08-08 12:49:26 +0000
@@ -1604,9 +1604,14 @@
if not key in tax_grouped:
tax_grouped[key] = val
else:
+ for rec in line.invoice_line_tax_id:
+ if rec.child_ids:
+ tax_grouped[key]['base'] = line ['price_unit'] * line['quantity']
+ tax_grouped[key]['base_amount'] = val['base_amount']
+ else:
+ tax_grouped[key]['base'] += val['base']
+ tax_grouped[key]['base_amount'] += val['base_amount']
tax_grouped[key]['amount'] += val['amount']
- tax_grouped[key]['base'] += val['base']
- tax_grouped[key]['base_amount'] += val['base_amount']
tax_grouped[key]['tax_amount'] += val['tax_amount']
for t in tax_grouped.values():
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp