Skip to content

OD501 manifest-data-missing

A file listed in the manifest does not exist.

Category Severity Series Needs the index
Correctness Error all no

What it reports

An entry of the manifest's data or demo list that names no file in the module directory. The path is taken relative to the module, as Odoo reads it.

Why it matters

Odoo opens every listed file in turn while it installs or updates the module, and a missing one stops it with File not found. A demo file opens only in a database created with demo data. Through saas~11.4 the module then installs on production and fails on the test database. From saas~11.5 it installs on both, without its demo data on the test one: see load failures. The cause is usually a file renamed or moved without updating the manifest, which also leaves the renamed file unloaded and reported by OD502.

Example

__manifest__.py
{
    "name": "Library loans",
    "version": "18.0.1.0.0",
    "depends": ["base"],
    "data": [
        "security/ir.model.access.csv",
        "views/library_loan_view.xml",
    ],
}

The file on disk is views/library_loan_views.xml.

__manifest__.py
{
    "name": "Library loans",
    "version": "18.0.1.0.0",
    "depends": ["base"],
    "data": [
        "security/ir.model.access.csv",
        "views/library_loan_views.xml",
    ],
}

Suppressing

"views/library_loan_view.xml",  # odooscan: ignore[OD501]

See suppressing a finding.