Skip to main content
OLS04xxx diagnostics validate __manifest__.py files. OdooLS parses manifests using Python’s ast.literal_eval, so only static literal values are accepted. Any dynamic constructs (function calls, dict unpacking, variable references) will trigger errors.
Default severity: ErrorMessage: A manifest should contain exactly one dictionaryThe __manifest__.py file must evaluate to a single dictionary literal. OdooLS (and Odoo itself) uses ast.literal_eval to parse manifests, which means the entire file must be a single expression that is a dict.Fix: Remove any code outside the dictionary literal. The file should contain nothing other than the dict.
# Correct
{
    'name': 'My Module',
    'depends': ['base'],
}
Default severity: ErrorMessage: A manifest should not have duplicate keysThe manifest dictionary defines the same key more than once. Only the last definition would take effect, but this is almost always a mistake.Fix: Remove the duplicate key and merge the values if needed.
Default severity: ErrorMessage: The name of the module should be a stringThe name key in the manifest must be a string literal.
{
    'name': 42,  # OLS04003
}
Fix: Set name to a string: 'name': 'My Module'.
Default severity: ErrorMessage: The depends value should be a listThe depends key must be a list, not a string, tuple, or other value.
{
    'depends': 'base',  # OLS04004: should be ['base']
}
Fix: Wrap the value in a list: 'depends': ['base'].
Default severity: ErrorMessage: The depends key should be a list of stringsEvery element in the depends list must be a string literal (the technical name of a module).
{
    'depends': ['base', 123],  # OLS04005: 123 is not a string
}
Fix: Ensure all entries are string literals.
Default severity: ErrorMessage: A module cannot depends on itselfThe manifest’s depends list contains the name of the module itself, which is invalid.Fix: Remove the module’s own name from the depends list.
Default severity: ErrorMessage: The data value should be a listThe data key must be a list of file paths, not a string or other type.Fix: Wrap the value in a list: 'data': ['views/my_view.xml'].
Default severity: ErrorMessage: The data key should be a list of stringsEvery element in the data list must be a string literal representing a relative file path.Fix: Ensure all entries are string file path literals.
Default severity: ErrorMessage: Manifest keys should be stringsAll dictionary keys in the manifest must be string literals. Integer or other non-string keys are not valid.Fix: Replace non-string keys with string literals.
Default severity: ErrorMessage: Module {0} depends on {1} which is not found. Please review your addons pathsA module listed in depends cannot be found in any of the configured addon paths. This means either the module name is wrong, or the addon directory containing it is not configured.Fix:
  1. Check the module name for typos.
  2. Ensure the addon path containing the dependency is listed in odools.toml.
  3. Verify the dependency folder contains both __init__.py and __manifest__.py.
Default severity: ErrorMessage: Do not use dict unpacking to build your manifestDict unpacking (**some_dict) inside the manifest is not supported because manifests must be parseable with ast.literal_eval, which does not execute expressions.
{
    'name': 'My Module',
    **shared_manifest,  # OLS04011
}
Fix: Inline all values directly into the manifest dictionary.
Default severity: ErrorMessage: Module dependency: module {0} depends on current moduleA circular dependency was detected: the current module depends on module {0}, which (directly or transitively) depends back on the current module.Fix: Restructure your module dependencies to remove the cycle. Extract shared code into a base module that neither side depends on circularly.

Build docs developers (and LLMs) love