From 3e8aa93bcbb4b731abc5dca9ee484bfbcbdc2f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 1 Sep 2009 11:24:52 +0200 Subject: [PATCH] Add company to search domain for root user because he is skipped by ir.rule --- company.py | 7 +++++++ 1 file changed, 7 insertions(+) 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()