[FIX] product: use new api to retrieve user company

This commit is contained in:
Denis Ledoux 2014-11-04 13:04:50 +01:00
parent f7723037d6
commit 0f52e22906
1 changed files with 1 additions and 1 deletions

View File

@ -590,7 +590,7 @@ class product_template(osv.osv):
if ptype != 'standard_price':
res[product.id] = product[ptype] or 0.0
else:
company_id = self.pool['res.users'].read(cr, uid, uid, ['company_id'], context=context)[0]
company_id = product.env.user.company_id.id
product = product.with_context(force_company=company_id)
res[product.id] = res[product.id] = product.sudo()[ptype]
if ptype == 'list_price':