From 12eb1573973d2352a0b26c685ac2571de4387595 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 25 Apr 2014 14:55:07 +0200 Subject: [PATCH] [FIX] product: price computation failed when for pricelists based on Cost price for non-employee users bzr revid: dle@openerp.com-20140425125507-njfyl1r6wn11vqwx --- addons/product/product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index 34503b5136e..5d6fb7a15bc 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -24,7 +24,7 @@ import re from _common import ceiling -from openerp import tools +from openerp import tools, SUPERUSER_ID from openerp.osv import osv, fields from openerp.tools.translate import _ @@ -703,7 +703,7 @@ class product_product(osv.osv): res = {} product_uom_obj = self.pool.get('product.uom') - for product in self.browse(cr, uid, ids, context=context): + for product in self.browse(cr, SUPERUSER_ID, ids, context=context): res[product.id] = product[ptype] or 0.0 if ptype == 'list_price': res[product.id] = (res[product.id] * (product.price_margin or 1.0)) + \