Skip to content

resource-not-exist (ODOO053)

Preview (since 0.16.2.5) · Related issues · View source

Derived from the odoo linter.

This rule is unstable and in preview. The --preview flag is required for use.

What it does

Checks that every file listed in the data keys (data, demo, ...) of an Odoo module's __manifest__.py exists on disk.

Why is this bad?

Odoo aborts the module installation with a FileNotFoundError when a listed file is missing, so the mistake only surfaces at install/update time.

Example

{
    "data": [
        "views/deleted_or_typo_views.xml",
    ],
}

Use instead a path that exists relative to the module:

{
    "data": [
        "views/res_partner_views.xml",
    ],
}