[FIX] multi-company

bzr revid: fp@tinyerp.com-20100510183249-s1k1c0o1umdh2m6r
This commit is contained in:
Fabien Pinckaers 2010-05-10 20:32:49 +02:00
parent 220d5b2f37
commit de0f1d7863
1 changed files with 1 additions and 1 deletions

View File

@ -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']),