Always use Transaction user to get company

issue8802
review264541002
This commit is contained in:
Cédric Krier committed 2019-11-16 12:45:28 +01:00
1 parent e2226c0f66
commit c2382fb243
1 file changed
+1 -2
+1 -2
View File
@@ -47,8 +47,7 @@ class Carrier(ModelSQL, ModelView):
'Compute carrier sale price with currency'
User = Pool().get('res.user')
if self.carrier_cost_method == 'product':
user = User(Transaction().user
or Transaction().context.get('user'))
user = User(Transaction().user)
return self.carrier_product.list_price, user.company.currency.id
return 0, None