From dc61e547ae5e69d4c1250a6911ea42f497b7edd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dukai=20G=C3=A1bor?= <> Date: Mon, 21 Feb 2011 12:55:45 +0530 Subject: [PATCH] [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 --- addons/purchase/purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index f2ef17a183d..63dbf4d9dcc 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -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)