Merge lp:~openerp-dev/openobject-addons/6.1-opw-582323-ado into lp:openobject-addons/6.1

Proposed by Amit Dodiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-582323-ado
Merge into: lp:openobject-addons/6.1
Diff against target: 16 lines (+5/-1)
1 file modified
account_anglo_saxon/invoice.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-582323-ado
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+139617@code.launchpad.net

Description of the change

Hello,

[FIX] anglo_saxon accounting : wrong price difference entry when multicurrency with no price difference is there

While working with multicurrency in anglo_saxon the journal entry contains the wrong entry of price difference if there is no difference in amount of currency / rate.

For reproducing the issue please refer the doc attached in bug report.

Regards,
Amit

To post a comment you must log in.

Unmerged revisions

7092. By Amit Dodiya<email address hidden>

[FIX] anglo_saxon accounting : wrong price difference entry when multicurrency with no price difference is there

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_anglo_saxon/invoice.py'
2--- account_anglo_saxon/invoice.py 2012-02-15 16:06:28 +0000
3+++ account_anglo_saxon/invoice.py 2012-12-13 06:50:24 +0000
4@@ -118,7 +118,11 @@
5 if a == line['account_id'] and i_line.product_id.id == line['product_id']:
6 uom = i_line.product_id.uos_id or i_line.product_id.uom_id
7 standard_price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id)
8- if standard_price != i_line.price_unit and line['price_unit'] == i_line.price_unit and acc:
9+ if inv.currency_id.id != company_currency:
10+ prices = self.pool.get('res.currency').compute(cr, uid, inv.currency_id.id, company_currency, i_line.price_unit, context={'date': inv.date_invoice})
11+ else:
12+ prices = i_line.price_unit
13+ if standard_price != prices and line['price_unit'] == i_line.price_unit and acc:
14 price_diff = i_line.price_unit - standard_price
15 line.update({'price':standard_price * line['quantity']})
16 diff_res.append({