[FIX] MRP: Proper context value passed for PO creation from packing via SO

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

bzr revid: jvo@tinyerp.com-20091204141246-ek5f8axx0zvg121q
This commit is contained in:
Jay (Open ERP) 2009-12-04 19:42:46 +05:30
parent 7eaa92708a
commit c9a07db7c0
1 changed files with 4 additions and 2 deletions

View File

@ -1078,11 +1078,13 @@ class mrp_procurement(osv.osv):
newdate = newdate - DateTime.RelativeDateTime(days=company.po_lead)
newdate = newdate - procurement.product_id.seller_ids[0].delay
context.update({'lang':partner.lang})
#Passing partner_id to context for purchase order line integrity of Line name
context.update({'lang':partner.lang, 'partner_id':partner_id})
product=self.pool.get('product.product').browse(cr,uid,procurement.product_id.id,context=context)
line = {
'name': product.name,
'name': product.partner_ref,
'product_qty': qty,
'product_id': procurement.product_id.id,
'product_uom': uom_id,