Skip to content

renamed-field-parameter (ODOO030)

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 field arguments that were renamed in newer Odoo versions (digits_computedigits, selectindex).

Why is this bad?

The old parameter names are silently ignored by the current ORM, so the intended behavior (precision, indexing) is lost.

Example

amount = fields.Float(digits_compute=get_precision("Account"))

Use instead:

amount = fields.Float(digits=get_precision("Account"))