odoo-exception-warning (ODOO020)
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 from odoo.exceptions import Warning.
Why is this bad?
odoo.exceptions.Warning is a deprecated alias for odoo.exceptions.UserError.
Example
Use instead: