Skip to content

category-allowed (ODOO065)

Preview (since 0.16.2.13) · 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 the category in an Odoo module's manifest is one of the categories the project allows.

Why is this bad?

Categories group modules in the Apps list. Teams that standardize on a fixed set of categories end up with modules scattered across near-duplicate categories ("Accounting" vs "Account" vs "Finance") when typos and one-off names go unnoticed.

Example

{
    "name": "My Module",
    "category": "Acounting",
}

Use instead:

{
    "name": "My Module",
    "category": "Accounting",
}

Options

The rule is inert until category-allowed lists at least one category, mirroring pylint-odoo, whose --category-allowed also defaults to an empty list. Paid apps have a separate rule with the store's own fixed list, category-allowed-app (OAPP001).