[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:
parent
b447d7b063
commit
da17723bef
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue