[MERGE] forward port of branch 8.0 up to 491372e
[odoo/odoo.git] / addons / product / product.py
index fab8dbd..9c8d3b4 100644 (file)
@@ -589,7 +589,9 @@ class product_template(osv.osv):
             if ptype != 'standard_price':
                 res[product.id] = product[ptype] or 0.0
             else:
-                res[product.id] = product.sudo()[ptype]
+                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':
                 res[product.id] += product._name == "product.product" and product.price_extra or 0.0
             if 'uom' in context: