diff --git a/odoo/addons/base/models/res_users.py b/odoo/addons/base/models/res_users.py index 6fdf7bc8b56..06df0a5a732 100644 --- a/odoo/addons/base/models/res_users.py +++ b/odoo/addons/base/models/res_users.py @@ -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')