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

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

Description of the change

Hello,

 I have fixed this bug, wrong calculation of margin of sales.

 For more details, see:
 https://bugs.launchpad.net/openobject-addons/+bug/1226860

Thanks

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

Unmerged revisions

8971. By Jitendra Prajapati(OpenERP)

[FIX]margin of sales

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-12 10:36:52 +0000
4@@ -65,7 +65,7 @@
5 for sale in self.browse(cr, uid, ids, context=context):
6 result[sale.id] = 0.0
7 for line in sale.order_line:
8- result[sale.id] += line.margin or 0.0
9+ result[sale.id] += line.price_subtotal - (line.purchase_price * line.product_uos_qty) or 0.0
10 return result
11
12 def _get_order(self, cr, uid, ids, context=None):

Subscribers

People subscribed via source and target branches

to all changes: