[FIX] MRP : Raw Procurement creates a purchase order with wrong supplier and price(when there are more than 1 suppliers)

lp bug: https://launchpad.net/bugs/628702 fixed

bzr revid: jvo@tinyerp.com-20110221072545-hwfs99sgrrm60gxm
This commit is contained in:
Dukai Gábor 2011-02-21 12:55:45 +05:30 committed by Jay Vora (OpenERP)
parent 698cf71dcc
commit dc61e547ae
1 changed files with 1 additions and 1 deletions

View File

@ -787,7 +787,7 @@ class procurement_order(osv.osv):
if seller_qty:
qty = max(qty,seller_qty)
price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, False, {'uom': uom_id})[pricelist_id]
price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, partner_id, {'uom': uom_id})[pricelist_id]
newdate = datetime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S')
newdate = (newdate - relativedelta(days=company.po_lead)) - relativedelta(days=seller_delay)