odools.toml file.
Each [[config]] section defines one profile. Profiles can inherit from each other,
merge or override array fields, and use path variables to auto-detect version information from the workspace.
Profile basics
Every profile has aname field. The built-in fallback profile is always named "default".
odools.toml, it loads all profiles and makes them available.
Non-abstract profiles are all applied to the session simultaneously.
Inheritance with extends
A profile can inherit every field from another profile using the extends key.
Child settings override parent settings for scalar fields.
v17 and v16 both inherit python_path and diag_missing_imports from base
but each have their own odoo_path and addons_paths.
Circular
extends chains are detected and rejected with an error at startup.Abstract profiles
A profile withabstract = true is a template: it contributes settings to child profiles via extends
but is not itself activated as a working configuration.
abstract is a computed flag — OdooLS sets it automatically on profiles that use ${splitVersion}
(see below). You do not normally set it manually in your config file.Merging array fields
Two fields control how array values from a parent profile are combined with the child’s values:| Field | Default | Behaviour |
|---|---|---|
addons_merge | "merge" | Append parent addons_paths to the child’s list |
additional_stubs_merge | "merge" | Append parent additional_stubs to the child’s list |
"override" to ignore the parent’s values entirely.
The $version variable
$version lets you set a version string that can be referenced in path fields.
OdooLS expands $version wherever it appears in other field values.
Three ways to supply a version:
-
Literal string — provide the version directly.
-
Path to
__manifest__.py— OdooLS reads the"version"key and extracts themajor.minorportion. -
${splitVersion}suffix — OdooLS scans the parent directory for subdirectories whose names match amajor.minorversion pattern and creates one derived profile per version found. The parent profile is automatically markedabstract.With directories/opt/odoo/16.0/and/opt/odoo/17.0/present, OdooLS generates two concrete profiles:default-16.0anddefault-17.0.
The $base variable and ${detectVersion}
$base sets a base path variable that can be reused across multiple fields.
Its most powerful use is the ${detectVersion} suffix, which tells OdooLS to match
the workspace folder path against the prefix before ${detectVersion} and extract the
next path component as the version.
Version component is extracted
The directory component immediately after
/opt/odoo/ (for example 17.0) becomes $version.Supported path variables
The following template variables are supported in path fields:| Variable | Description |
|---|---|
${workspaceFolder:NAME} | Absolute path of the workspace folder named NAME |
${userHome} | Current user’s home directory |
$version | Resolved version string (set by $version or auto-detected) |
$base | Resolved base path (set by $base) |
$autoDetectAddons | Special value in addons_paths; replaced by the workspace folder if it is a valid addon directory |
Multi-version example
The example below shows a complete multi-version setup using explicit inheritance:${detectVersion} for automatic version detection: