Amit Dodiya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-574268-ado into 
lp:openobject-addons/6.0.

Requested reviews:
  Xavier ALT (OpenERP) (xal-openerp)
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-574268-ado/+merge/104205

Hello,

"[FIX] conversion of uom is not correct in purchase order when we have diffrent 
uom in product and supplier"

Steps:
1). Create a stockable product with Procurement method = "make to order" and 
Supply method = "buy"
2). Add supplier in above product with Minimal quantity = 1, with supplier uom 
= tonne and add two pricelist(quantity = 1, unit price = 200 and quantity = 10, 
unit price = 180)
3). Set product default uom = gm with ratio 125.0000 and Uom Type = Smaller 
than reference Uom, Purchase uom = tonne
4). Change Default purchase pricelist configuration set based on "Partner 
section of the product form"
5). Create a sale order, in sale order line add above product with quantity = 
125000 in Uom = gm, Confirm the sale order, Run the procurement, Now the 
purchase order is created but the purchase order line contains the quantity 
without conversion. 

The product quantity in purchase order line should be converted in supplier uom.

Regards,
Amit
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-574268-ado/+merge/104205
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-574268-ado.
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2012-03-20 10:37:52 +0000
+++ purchase/purchase.py	2012-05-01 05:46:21 +0000
@@ -810,7 +810,8 @@
 
             qty = uom_obj._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, uom_id)
             if seller_qty:
-                qty = max(qty,seller_qty)
+                conv_seller_qty = uom_obj._compute_qty(cr, uid, procurement.product_uom.id, seller_qty, uom_id)
+                qty = max(qty, conv_seller_qty)
 
             price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, partner_id, {'uom': uom_id})[pricelist_id]
 

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to