method-inverse (C8110)#
A field’s inverse method is not named _inverse_....
What it does#
Checks that the method a field names in inverse= starts with _inverse_.
Why is this bad?#
The OCA naming convention makes the purpose of a method clear without looking up the field that uses it.
Example#
total = fields.Float(inverse="get_total")
Use instead:
total = fields.Float(inverse="_inverse_total")