Merge lp:~openerp-dev/openobject-addons/trunk-bug-994445-rmu into lp:openobject-addons

Proposed by Ravish(OpenERP)
Status: Rejected
Rejected by: Harry (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-994445-rmu
Merge into: lp:openobject-addons
Diff against target: 20 lines (+2/-2)
1 file modified
account/account_invoice.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-994445-rmu
Reviewer Review Type Date Requested Status
Amit Parik (community) Approve
OpenERP Core Team Pending
Review via email: mp+105043@code.launchpad.net

Description of the change

Hello,

I have solved the problem of "differences amount in line subtotal and tax base" especially if Account precision and currency precision are different.Now it's working fine,which I have explain with example in bug's comment

Thanks!!

To post a comment you must log in.
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

It's good improvement because we have to use rounding a base amount after multiplication of qty with price_unit instead of only rounding on price_unit.

Thank You!

review: Approve

Unmerged revisions

6779. By Ferdinand@camptocamp

[FIX] the problem of differences between line subtotal and tax base

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_invoice.py'
2--- account/account_invoice.py 2012-04-03 10:58:01 +0000
3+++ account/account_invoice.py 2012-05-08 08:57:18 +0000
4@@ -1597,14 +1597,14 @@
5
6 for line in inv.invoice_line:
7 for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, line.product_id, inv.partner_id)['taxes']:
8- tax['price_unit'] = cur_obj.round(cr, uid, cur, tax['price_unit'])
9+
10 val={}
11 val['invoice_id'] = inv.id
12 val['name'] = tax['name']
13 val['amount'] = tax['amount']
14 val['manual'] = False
15 val['sequence'] = tax['sequence']
16- val['base'] = tax['price_unit'] * line['quantity']
17+ val['base'] = cur_obj.round(cr, uid, cur, tax['price_unit'] * line['quantity'])
18
19 if inv.type in ('out_invoice','in_invoice'):
20 val['base_code_id'] = tax['base_code_id']

Subscribers

People subscribed via source and target branches

to all changes: