OLS<section><number>, a default severity, and a human-readable message.
Diagnostics are grouped into five sections based on the part of the codebase they validate.
Diagnostic categories
| Category | Code range | What it checks |
|---|---|---|
| Python / Syntax | OLS01xxx | Python syntax errors, class structure, argument validation |
| Imports | OLS02xxx | Missing imports, failed symbol evaluation |
| Odoo / Models | OLS03xxx | Model dependencies, field definitions, domain validation, deprecations |
| Manifests | OLS04xxx | __manifest__.py structure and dependency declarations |
| XML / CSV | OLS05xxx | XML data file structure, XML IDs, node and attribute validation |
Severity levels
Every diagnostic has a default severity that you can override inodools.toml.
| Severity | Effect |
|---|---|
Error | Shown as a red underline; counts as an error in the Problems panel |
Warning | Shown as a yellow underline |
Info | Shown as a blue underline; purely informational |
Hint | Subtle hint-level annotation |
Disabled | Completely suppresses the diagnostic — no underline, no entry in Problems |
Disabled is the cleanest way to silence a diagnostic you do not want to see. It has no effect on code execution; it only prevents OdooLS from reporting that code.
Suppressing a diagnostic with # noqa
You can suppress a diagnostic on a single line in Python files by adding a # noqa comment. OdooLS recognises the following forms:
noqa keyword separated by commas, spaces, or colons:
Changing severity in configuration
Usediagnostic_settings in odools.toml to override the default severity for any code:
Browse by category
Python & Syntax
OLS01xxx — syntax errors, argument validation, class structure
Imports
OLS02xxx — missing imports, failed symbol evaluation
Odoo Models
OLS03xxx — model dependencies, fields, domains, deprecations
Manifests
OLS04xxx —
__manifest__.py structure and dependency validationXML & CSV
OLS05xxx — XML data file nodes, attributes, and XML IDs
Configuration
Override severity levels and suppress diagnostics by path or code