inheritable-method-lambda (ODOO033)
Preview (since 0.16.2.2) · Related issues · View source
Derived from the odoo linter.
This rule is unstable and in preview. The --preview flag is required for use.
What it does
Checks for default=/domain= field arguments that pass a direct method reference
instead of a lambda.
Why is this bad?
A direct reference binds the field to that exact function object, so a subclass
overriding the method is silently ignored. A lambda dispatches through self and
preserves inheritability.
Example
Use instead: