manifest-deprecated-key (ODC8103)
Preview (since 0.16.2.1) · Related issues · View source
Derived from the odoo linter.
Fix is sometimes available.
This rule is unstable and in preview. The --preview flag is required for use.
What it does
Checks for deprecated keys in an Odoo module's __manifest__.py.
Why is this bad?
A deprecated key is ignored by the versions of Odoo that deprecated it, so it silently
stops doing what its author expected: description has been superseded by the module's
README.rst/README.md, active by auto_install, and the qweb key by the assets
key since Odoo 16.0 removed the web.assets_qweb bundle.
Example
Use instead:
Options
By default the rule reports active, description and — from Odoo 16.0 on, according to
the configured odoo-version — qweb. That is
wider than pylint-odoo, whose --manifest-deprecated-keys defaults to description alone
and has no notion of the version a key was deprecated in, so projects had to spell the
other keys out in their configuration. Setting
manifest-deprecated-keys replaces
that built-in list, and the keys it names are then reported for every Odoo version.
Fix safety
The fix that removes the key is marked safe only for description, which modern Odoo
ignores outright. For every other key it is unsafe: active and qweb may still need
their replacement (auto_install, an assets entry) rather than plain deletion, and a
key named through manifest-deprecated-keys can mean anything at all.