[FIX] product: use new api to retrieve product standard price as SUPERUSER

As it looks like self is a product.template, and product can be a product.product. Using the new api avoid to have this problem.
This commit is contained in:
Denis Ledoux 2014-10-14 12:46:07 +02:00
parent b447d7b063
commit da17723bef
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:
res[product.id] = self.read(cr, SUPERUSER_ID, product.id, [ptype], context=context)[ptype] or 0.0
res[product.id] = product.sudo()[ptype]
if ptype == 'list_price':
res[product.id] += product._name == "product.product" and product.price_extra or 0.0
if 'uom' in context: