Sales margin calculation need to consider uom in sales line

Bug #1186938 reported by Arif
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP R&D Addons Team 3

Bug Description

To see the issue

- Create a product with default UoM having value 'Greater' than 'Reference UoM of the Category'
- Set Sales Price and Cost Price
- Update some stock and goto sales.

In Sale order line, select this Product, then change 'Unit of Measure' in sales line to a Smaller or Greater UoM of products default UoM and the Margin value still remains same. Actually margin calculation need to consider the select UoM in sales line instead of always finding difference between the 'Sale Price' and 'Cost Price' set in Product configuration.

See my screenshots, it may help you to get a close look on issue.

Tags: margin sale
Revision history for this message
Arif (arifmlpm) wrote :
description: updated
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Arif (arifmlpm) wrote :

Hi Team,

Thanks for your kind attention on this bug.

I have fixed issue, and have attached patch. (For the file : sale_margin/sale_margin.py ).
It will respect both currency and uom along cost price of product for margin calculation.

Please check and you can merge.

Thanks,
Arif

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Arif,

Thanks for your patch.

@Jitendra: Thanks for put the MP on this.

Cheers!

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Jitendra Prajapati(OpenERP) (jitendra.prajapati-openerp) wrote :

Hello,

  It has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1186938-jpr

  revision-id: <email address hidden>

  revno: 8993

It will be available in trunk soon.

Thanks

Changed in openobject-addons:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.