Add company to search domain for root user because he is skipped by ir.rule
This commit is contained in:
1 parent
b593915a90
commit
3e8aa93bcb
1 file changed
+7
@@ -194,6 +194,13 @@ class Property(ModelSQL, ModelView):
|
||||
res['company'] = user.company.id
|
||||
return res
|
||||
|
||||
def search(self, cursor, user, domain, offset=0, limit=None, order=None,
|
||||
context=None, count=False):
|
||||
if user == 0:
|
||||
domain = ['AND', domain[:], ('company', '=', False)]
|
||||
return super(Property, self).search(cursor, user, domain, offset=offset,
|
||||
limit=limit, order=order, context=context, count=count)
|
||||
|
||||
Property()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user