Skip to main content
OdooLS emits real-time diagnostics as you edit Python, XML, CSV, and manifest files. Each diagnostic carries a unique code in the format 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

CategoryCode rangeWhat it checks
Python / SyntaxOLS01xxxPython syntax errors, class structure, argument validation
ImportsOLS02xxxMissing imports, failed symbol evaluation
Odoo / ModelsOLS03xxxModel dependencies, field definitions, domain validation, deprecations
ManifestsOLS04xxx__manifest__.py structure and dependency declarations
XML / CSVOLS05xxxXML data file structure, XML IDs, node and attribute validation

Severity levels

Every diagnostic has a default severity that you can override in odools.toml.
SeverityEffect
ErrorShown as a red underline; counts as an error in the Problems panel
WarningShown as a yellow underline
InfoShown as a blue underline; purely informational
HintSubtle hint-level annotation
DisabledCompletely suppresses the diagnostic — no underline, no entry in Problems
Setting a code to 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:
from some.module import something  # noqa
from some.module import something  #noqa
from some.module import something  # odools: noqa
To suppress only specific codes, list them after the noqa keyword separated by commas, spaces, or colons:
from some.module import something  # noqa: OLS02001
from some.module import something  # noqa: OLS02001, OLS03001

Changing severity in configuration

Use diagnostic_settings in odools.toml to override the default severity for any code:
[config.diagnostic_settings]
OLS03001 = "Disabled"   # suppress model dependency check
OLS02001 = "Warning"    # downgrade missing import to warning
OLS01007 = "Error"      # keep wrong argument count as an error
See Configuring diagnostics for the full set of options including path-based filters.

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 validation

XML & CSV

OLS05xxx — XML data file nodes, attributes, and XML IDs

Configuration

Override severity levels and suppress diagnostics by path or code

Build docs developers (and LLMs) love