Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] core: include inactive companies in
_check_company
`res.users.company_ids` returns only active companies, while `res.users.company_id` may be inactive. This leads to a situation where `self.env.company` is inactive but still associated to `self.env.user`. Since in multiple cases the default value for relational fields pointing to `res.users` is `self.env.user`, we may get an error in this check: `self.env.company` is not in `self.env.user.company_ids`. See https://github.com/odoo/odoo/blob/5506ca7/odoo/addons/base/models/res_users.py#L281-L282 closes odoo#147127 Signed-off-by: Raphael Collet <rco@odoo.com>
- Loading branch information