odools.toml file written in TOML format.
When a workspace is opened, OdooLS walks up the directory tree from the workspace root until it finds an odools.toml file (or reaches the filesystem root).
You can also supply an explicit path with the --config-path CLI flag.
File structure
The file contains one or more[[config]] sections (a TOML array of tables).
Each section defines a named profile. See Configuration Profiles for details on how profiles inherit from each other.
Configuration fields
Core identity
The profile name. Each
[[config]] section must have a unique name.
The built-in fallback profile is always named "default".Name of another profile to inherit settings from.
Child settings take precedence over parent settings.
Array fields (
addons_paths, additional_stubs) are merged according to their respective *_merge fields.
Circular dependencies are detected and rejected.
See Configuration Profiles for a full inheritance example.Paths
Absolute path to the Odoo community source directory.
OdooLS validates that the directory looks like a valid Odoo installation.
If exactly one workspace folder is a valid Odoo path and
odoo_path is not set, it is inferred automatically.List of directories that contain Odoo addon modules.
Supports the special value
"$autoDetectAddons": when present, OdooLS checks
whether the current workspace folder itself is a valid addon directory and adds it automatically.Path variables ${workspaceFolder:NAME} and ${userHome} are supported.Controls how
addons_paths is combined with the parent profile when using extends."merge"— append the parent’s addon paths to the child’s list."override"— use only the child’s addon paths, ignoring the parent’s.
Path to the Python executable (or command name resolvable on
$PATH) to use for type analysis.
OdooLS uses this to discover installed packages and stubs.Alternative path to Python standard library stubs.
When not set, OdooLS uses its bundled typeshed stdlib stubs.
List of additional directories containing type stubs.
Each stub package must be in a subdirectory named after the package it stubs.
Controls how
additional_stubs is combined with the parent profile when using extends."merge"— append the parent’s stubs to the child’s list."override"— use only the child’s stubs, ignoring the parent’s.
Performance
Enable on-disk caching of parsed files to speed up startup.
Disable if you encounter stale analysis results.
Delay in milliseconds before OdooLS refreshes diagnostics after a file change.
Must be between 1000 and 15000 ms. Values outside this range are clamped automatically.
Diagnostics
Controls which missing-import diagnostics are reported.
| Value | Behaviour |
|---|---|
"none" | Suppresses all missing-import warnings |
"only_odoo" | Reports missing imports only within the Odoo source tree |
"all" | Reports all missing imports (default) |
Per-code severity overrides. Keys are diagnostic codes (
OLS01000, OLS03001, …).
Valid severity values: "Error", "Warning", "Info", "Hint", "Disabled".Ordered list of filter rules. Each rule can suppress or restrict diagnostics by path, code, or severity type.
A diagnostic is suppressed when it matches a rule with
All filter arrays default to
path_type = "in" (the default) and at least one of the rule’s patterns applies.Each filter object has the following fields:| Field | Type | Description |
|---|---|---|
paths | string[] | Glob patterns matched against the file path |
codes | string[] | Regular expressions matched against the diagnostic code |
types | string[] | Severity levels to match ("Error", "Warning", "Info", "Hint") |
path_type | "in" | "not_in" | "in" suppresses matching diagnostics; "not_in" suppresses diagnostics outside the matched paths |
[] (match everything if left empty).
"Disabled" is not a valid value for types.Autocomplete
When
true, autocomplete suggestions for model references are filtered to valid model names only.
Set to false to see all symbols in completion lists.Stubs
Disable the bundled typeshed stubs for external packages.
This does not remove the standard library stubs (those are always required).
Use this when you want to provide your own versions of third-party package stubs via
additional_stubs.Variables
Sets a version string that can be referenced as
$version in other path fields.Accepted values:- A version string such as
"17.0"— used as-is. - A path to a
__manifest__.pyfile — OdooLS reads the"version"key and extracts the major.minor components. - A path ending with
${splitVersion}— OdooLS enumerates versioned subdirectories at that path and creates one derived profile per version found.
Sets a base path variable that can be referenced as See Configuration Profiles for a full auto-detection example.
$base in other path fields.Supports the special suffix ${detectVersion}: OdooLS matches the workspace path against the prefix before ${detectVersion} and extracts the next path component as the version, setting $version automatically.