diff --git a/company.py b/company.py index de631ba1af..6f4b0b872f 100644 --- a/company.py +++ b/company.py @@ -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()