diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2010-05-10 20:32:49 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2010-05-10 20:32:49 +0200 |
| commit | de0f1d786380a43a96af7ea46a3eef1a45cabf65 (patch) | |
| tree | 40d9845446b205a413f53fe8c5b6359fb5d6be0d | |
| parent | 220d5b2f37d648bb1b8fbd4ad25b5ac2581cf270 (diff) | |
[FIX] multi-company
bzr revid: fp@tinyerp.com-20100510183249-s1k1c0o1umdh2m6r
| -rw-r--r-- | bin/addons/base/res/res_user.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py index 341680a23ac..1542b58935c 100644 --- a/bin/addons/base/res/res_user.py +++ b/bin/addons/base/res/res_user.py @@ -212,7 +212,7 @@ class users(osv.osv): def _check_company(self, cr, uid, ids, context=None): - return all(this.company_id in this.company_ids for this in self.browse(cr, uid, ids, context)) + return all(((this.company_id in this.company_ids) or not this.company_ids) for this in self.browse(cr, uid, ids, context)) _constraints = [ (_check_company, 'The chosen company is not in the allowed companies', ['company_id', 'company_ids']), |
