upgrade-removed-access-methods (U2020)#

An access or recursion method removed in Odoo 20.0.

Applies to Odoo 20.0 and later.

What it does#

Reports calls and overrides of check_access_rights, check_access_rule, _filter_access_rules, _filter_access_rules_python, check_field_access_rights, _check_recursion, _check_m2m_recursion and toggle_active.

Why is this bad?#

Deprecated in 18.0 and removed in 20.0: calls raise AttributeError and overrides are never called. Use check_access/has_access/ _filtered_access, check_field_access, _has_cycle and action_archive/action_unarchive.

Fix safety#

Safe for x._check_recursion() and x._check_m2m_recursion(field), which become not x._has_cycle() and not x._has_cycle(field).