deprecated-odoo-method-call (ODOO068)
Preview (since 0.16.2.14) · Related issues · View source
Derived from the odoo linter.
Fix is sometimes available.
This rule is unstable and in preview. The --preview flag is required for use.
What it does
Checks for calls to ORM methods Odoo has deprecated, according to the configured
odoo-version.
Why is this bad?
A deprecated method raises a DeprecationWarning at runtime and will eventually be
removed. Most of the replacements are not drop-in — signatures, return types, and in the
case of _check_recursion even the sense of the returned boolean differ — so the call
sites have to be reviewed by hand.
Example
Use instead: