[FIX] base: a user needs to have allowed companies set.
X-original-commit: 4205cb2728041487bd026bf5c6bac590e0ace1e9
This commit is contained in:
@@ -389,7 +389,7 @@ class Users(models.Model):
|
||||
|
||||
@api.constrains('company_id', 'company_ids')
|
||||
def _check_company(self):
|
||||
if any(user.company_ids and user.company_id not in user.company_ids for user in self):
|
||||
if any(user.company_id not in user.company_ids for user in self):
|
||||
raise ValidationError(_('The chosen company is not in the allowed companies for this user'))
|
||||
|
||||
@api.constrains('action_id')
|
||||
|
||||
Reference in New Issue
Block a user