Skip to content

manifest-data-duplicated (ODOO048)

Preview (since 0.16.2.5) · Related issues · View source

Derived from the odoo linter.

Fix is always available.

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

What it does

Checks for file paths listed more than once in the same data key (data, demo, ...) of an Odoo module's __manifest__.py.

Why is this bad?

Odoo loads every listed file in order, so a duplicated entry is loaded twice: records are re-created or re-written and module installation gets slower for no reason.

Example

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

Use instead:

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