Merge lp:~openerp-dev/openobject-addons/trunk-bug-1176031-cod into lp:openobject-addons

Proposed by Chirag Dodiya(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1176031-cod
Merge into: lp:openobject-addons
Diff against target: 16 lines (+3/-2)
1 file modified
sale_margin/sale_margin.py (+3/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1176031-cod
Reviewer Review Type Date Requested Status
Turkesh Patel (openERP) Pending
Review via email: mp+199112@code.launchpad.net

Description of the change

Hello,

    I have fixed this bug "Wrong calculation of sale margin",in sale margin it was calculate margin base on product_uos_ qty which was wrong, i removed product_uos_ qty for calculate sale price and set product_uom_ qty for calculate purchase price.

Thanks,
Chirag Dodiya(cod).

To post a comment you must log in.

Unmerged revisions

9018. By Chirag Dodiya(OpenERP)

[FIX] fixed wrong calculation of sale margin

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sale_margin/sale_margin.py'
--- sale_margin/sale_margin.py 2013-10-27 12:31:04 +0000
+++ sale_margin/sale_margin.py 2013-12-16 13:06:56 +0000
@@ -45,9 +45,10 @@
45 res[line.id] = 045 res[line.id] = 0
46 if line.product_id:46 if line.product_id:
47 if line.purchase_price:47 if line.purchase_price:
48 res[line.id] = round((line.price_unit*line.product_uos_qty*(100.0-line.discount)/100.0) -(line.purchase_price*line.product_uos_qty), 2)48 res[line.id] = round((line.price_unit*(100.0-line.discount)/100.0) -(line.purchase_price*line.product_uom_qty), 2)
49
49 else:50 else:
50 res[line.id] = round((line.price_unit*line.product_uos_qty*(100.0-line.discount)/100.0) -(line.product_id.standard_price*line.product_uos_qty), 2)51 res[line.id] = round((line.price_unit*(100.0-line.discount)/100.0) -(line.product_id.standard_price*line.product_uom_qty), 2)
51 return res52 return res
5253
53 _columns = {54 _columns = {

Subscribers

People subscribed via source and target branches

to all changes: