Fix multi-company of Property when using root
If user is root, we must use the user in context issue2054 review41006 (transplanted from 7147b97254308bb63d8d0ac75bbd98c64e509830)
This commit is contained in:
1 parent
5a70706d1b
commit
53908cd964
1 file changed
+4
@@ -188,6 +188,10 @@ class Property(ModelSQL, ModelView):
|
||||
def _set_values(self, cursor, user_id, name, model, res_id, val, field_id,
|
||||
context=None):
|
||||
user_obj = self.pool.get('res.user')
|
||||
if context is None:
|
||||
context = {}
|
||||
if user_id == 0:
|
||||
user_id = context.get('user', user_id)
|
||||
user = user_obj.browse(cursor, user_id, user_id, context=context)
|
||||
res = super(Property, self)._set_values(cursor, user_id, name, model,
|
||||
res_id, val, field_id, context=context)
|
||||
|
||||
Reference in new issue
Block a user