odools.toml file under the [config] section.
diag_missing_imports
Controls which missing-import diagnostics (OLS02001) OdooLS emits.
| Value | Behavior |
|---|---|
"none" | No missing-import diagnostics are emitted anywhere |
"only_odoo" | Diagnostics only for imports inside Odoo addon modules |
"all" | Diagnostics for all imports in the workspace (default) |
diagnostic_settings
A map from diagnostic code to severity. Accepted severity values are
"Error", "Warning", "Info", "Hint", and "Disabled".Setting a code to "Disabled" completely suppresses it — no underline, no Problems panel entry.Codes not listed in
diagnostic_settings use their default severity as defined in the diagnostic code reference pages.diagnostic_filters
An ordered list of filters. Each filter matches diagnostics by file path, code pattern, and/or severity type, then suppresses the matched diagnostics for the matched files.
diagnostic_filters is a TOML table with the following fields:
Glob patterns that match file paths. Supports
*, **, and ?. Path variables ${userHome} and ${workspaceFolder:NAME} are expanded.Regular expression patterns matched against diagnostic codes (e.g.
"OLS03.*" matches all OLS03xxx codes). Defaults to matching all codes if omitted.Severity levels to filter:
"Error", "Warning", "Info". Defaults to all types if omitted. "Disabled" is not a valid value here.Controls how the
paths list is interpreted.| Value | Behavior |
|---|---|
"in" | Apply this filter to files matching the paths list |
"not_in" | Apply this filter to files not matching the paths list |
Examples
Suppress all model-dependency diagnostics in test files:Path variables
The following variables are expanded insidepaths strings:
| Variable | Expands to |
|---|---|
${userHome} | The current user’s home directory |
${workspaceFolder:NAME} | The absolute path of workspace folder named NAME |