From da17723bef0a51cbe033ff7f53a2a58a1b200157 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 14 Oct 2014 12:46:07 +0200 Subject: [PATCH] [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. --- addons/product/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/product.py b/addons/product/product.py index 6fc5515d566..7f3a33ce3a2 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -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: