Add company to search domain for root user because he is skipped by ir.rule

This commit is contained in:
Cédric Krier committed 2009-09-01 11:24:52 +02:00
1 parent b593915a90
commit 3e8aa93bcb
1 file changed
+7
+7
View File
@@ -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()