[trunk][purchase]Seller quantity for procurements uses default UOM
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Won't Fix
|
Medium
|
OpenERP R&D Addons Team 2 |
Bug Description
It appears that seller_qty is calculated using the default UOM rather than the purchase UOM. This might not be an issue for most things, but if the purchase UOM and default UOM are different, the quantity for PO's from procurements may be wrong.
For a test case, create a product 'XYZ' with a default UOM of 'each' and a purchase UOM of 'each x 10'. Now add a procurement order for quantity 2 of XYZ. When the purchase order is created, the quantity will be 10.
make_po() sets the qty to the supplier minimum (which uses the default UOM) or the procurement, whichever is higher. In this case it's the incorrect supplier minimum calc'd to be 10.
I'm not sure the seller_qty should be using the default UOM, it might make more sense for it to use the Purchase UOM, but the attached patch updates make_po() to do the conversion on seller_qty instead. The alternative would be to update _calc_qty() and change the UOM used.
Patch attached for latest trunk.
Related branches
- Rucha (Open ERP) (community): Approve
- Rohan Nayani(Open ERP) (community): Needs Resubmitting
- qdp (OpenERP): Pending requested
-
Diff: 63 lines (+22/-10)1 file modifiedpurchase/purchase.py (+22/-10)
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | Fix Committed → Won't Fix |
Hello John,
I have checked your scenario at my end and it is working as per required.
I have create a new "UOM"= 'each x 10' which is smaller then the reference UOM(PCE) with ratio 10.
Now I have created a SO for qty 3PC then related PO created for 30 'each x 10' so it is fine as per the calculation and the Purchase order line's UOM is same as purchase UOM.
For more information I have attached a video so would you please check it and notify us where you faced the problem and if I have missing anything.
Thanks and waiting for your reply!