[MERGE] lp:852456 (purchase: fix bad context handling in product_id_change)
bzr revid: rco@openerp.com-20120111085348-wejvj1ayz9ypd5g0
This commit is contained in:
commit
e99959800f
|
@ -715,11 +715,11 @@ class purchase_order_line(osv.osv):
|
|||
res = {}
|
||||
prod= self.pool.get('product.product').browse(cr, uid, product)
|
||||
product_uom_pool = self.pool.get('product.uom')
|
||||
|
||||
lang=False
|
||||
if partner_id:
|
||||
lang=self.pool.get('res.partner').read(cr, uid, partner_id, ['lang'])['lang']
|
||||
context={'lang':lang}
|
||||
context['partner_id'] = partner_id
|
||||
context_partner = {'lang': lang, 'partner_id': partner_id}
|
||||
|
||||
prod = self.pool.get('product.product').browse(cr, uid, product, context=context)
|
||||
prod_uom_po = prod.uom_po_id.id
|
||||
|
@ -735,7 +735,7 @@ class purchase_order_line(osv.osv):
|
|||
if uom1_cat != uom2_cat:
|
||||
uom = False
|
||||
|
||||
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id], context=context)[0][1]
|
||||
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id], context=context_partner)[0][1]
|
||||
res = {}
|
||||
for s in prod.seller_ids:
|
||||
if s.name.id == partner_id:
|
||||
|
|
Loading…
Reference in New Issue