upgrade-ir-access-models (U2019)#
Python code uses ir.model.access or ir.rule, replaced by ir.access in Odoo 20.0.
Applies to Odoo 20.0 and later.
What it does#
Reports the model names ir.model.access and ir.rule in Python.
Why is this bad?#
Odoo 20.0 replaced both by ir.access: env["ir.rule"] raises
KeyError. To check access, use records.has_access(operation) and
check_access(operation).