res = {}
product_uom_obj = self.pool.get('product.uom')
for product in products:
- res[product.id] = product[ptype] or 0.0
+ # standard_price field can only be seen by users in base.group_user
+ # Thus, in order to compute the sale price from the cost price for users not in this group
+ # We fetch the standard price as the superuser
+ 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
if ptype == 'list_price':
res[product.id] += product._name == "product.product" and product.price_extra or 0.0
if 'uom' in context: