[FIX] purchase: _calc_new_qty_price

The price must be compute with the purchase unit of measure set
on the product because qty is computed according to this unit of
measure.

opw:648513
This commit is contained in:
Goffin Simon 2015-09-09 10:11:08 +02:00
parent 186c77dad1
commit c092c40d14
1 changed files with 1 additions and 1 deletions

View File

@ -1466,7 +1466,7 @@ class procurement_order(osv.osv):
if qty != po_line.product_qty:
pricelist_obj = self.pool.get('product.pricelist')
pricelist_id = po_line.order_id.partner_id.property_product_pricelist_purchase.id
price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, po_line.order_id.partner_id.id, {'uom': procurement.product_uom.id})[pricelist_id]
price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, po_line.order_id.partner_id.id, {'uom': procurement.product_id.uom_po_id.id})[pricelist_id]
return qty, price