projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f772303
)
[FIX] product: use new api to retrieve user company
author
Denis Ledoux
<dle@odoo.com>
Tue, 4 Nov 2014 12:04:50 +0000
(13:04 +0100)
committer
Denis Ledoux
<dle@odoo.com>
Tue, 4 Nov 2014 12:04:50 +0000
(13:04 +0100)
addons/product/product.py
patch
|
blob
|
history
diff --git
a/addons/product/product.py
b/addons/product/product.py
index
52ae27e
..
8f4921f
100644
(file)
--- 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:
- company_id = self.pool['res.users'].read(cr, uid, uid, ['company_id'], context=context)[0]
+ 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':