Merge lp:~openerp-dev/openobject-addons/6.1-opw-577466-dhs into lp:openobject-addons/6.1

Proposed by Dhruti Shastri(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-577466-dhs
Merge into: lp:openobject-addons/6.1
Diff against target: 20 lines (+7/-2)
1 file modified
account/account_invoice.py (+7/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-577466-dhs
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+118739@code.launchpad.net

Description of the change

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.

To post a comment you must log in.

Unmerged revisions

6938. By Dhruti Shastri(OpenERP)

[Account] : Wrong Tax computation of Base Amount when Tax is depend on child (Case:577466)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
1604 if not key in tax_grouped:1604 if not key in tax_grouped:
1605 tax_grouped[key] = val1605 tax_grouped[key] = val
1606 else:1606 else:
1607 for rec in line.invoice_line_tax_id:
1608 if rec.child_ids:
1609 tax_grouped[key]['base'] = line ['price_unit'] * line['quantity']
1610 tax_grouped[key]['base_amount'] = val['base_amount']
1611 else:
1612 tax_grouped[key]['base'] += val['base']
1613 tax_grouped[key]['base_amount'] += val['base_amount']
1607 tax_grouped[key]['amount'] += val['amount']1614 tax_grouped[key]['amount'] += val['amount']
1608 tax_grouped[key]['base'] += val['base']
1609 tax_grouped[key]['base_amount'] += val['base_amount']
1610 tax_grouped[key]['tax_amount'] += val['tax_amount']1615 tax_grouped[key]['tax_amount'] += val['tax_amount']
16111616
1612 for t in tax_grouped.values():1617 for t in tax_grouped.values():