upgrade-user-has-groups (U1808)#
user_has_groups(), removed in Odoo 18.0, is called.
Applies to Odoo 18.0 and later.
What it does#
Reports calls to self.user_has_groups(...).
Why is this bad?#
Odoo 18.0 removed the method from models, without a deprecation period in
17.0: the call raises AttributeError. self.env.user.has_groups(...)
takes the same group expressions.
Fix safety#
Safe: x.user_has_groups(...) becomes x.env.user.has_groups(...).