Merge lp:~openerp-dev/openobject-addons/trunk-bug-1186938-jpr into lp:openobject-addons

Proposed by Jitendra Prajapati(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1186938-jpr
Merge into: lp:openobject-addons
Diff against target: 14 lines (+4/-1)
1 file modified
sale_margin/sale_margin.py (+4/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1186938-jpr
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+196701@code.launchpad.net

Description of the change

Hello,

   I have fixed this issue, Sales margin calculation need to consider uom in sales line

Thanks,
Jitendra (JPR)

To post a comment you must log in.

Unmerged revisions

8993. By Arif (arifmlpm)

[FIX]consider uom in sales line

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_margin/sale_margin.py'
2--- sale_margin/sale_margin.py 2013-04-15 10:23:49 +0000
3+++ sale_margin/sale_margin.py 2013-11-26 12:29:28 +0000
4@@ -35,7 +35,10 @@
5 to_cur = self.pool.get('product.pricelist').browse(cr, uid, [pricelist])[0].currency_id.id
6 if product:
7 purchase_price = self.pool.get('product.product').browse(cr, uid, product).standard_price
8- price = self.pool.get('res.currency').compute(cr, uid, frm_cur, to_cur, purchase_price, round=False)
9+ if context is None:
10+ context = {}
11+ context.update({'currency_id': to_cur, 'uom':uom})
12+ price = self.pool.get('product.product').price_get(cr, uid, [product], ptype='standard_price', context=context)[product]
13 res['value'].update({'purchase_price': price})
14 return res
15

Subscribers

People subscribed via source and target branches

to all changes: