Skip to content
Snippets Groups Projects
Commit de0f1d78 authored by Fabien Pinckaers's avatar Fabien Pinckaers
Browse files

[FIX] multi-company

bzr revid: fp@tinyerp.com-20100510183249-s1k1c0o1umdh2m6r
parent 220d5b2f
No related branches found
No related tags found
No related merge requests found
......@@ -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']),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment