Rules#

Run odl rule <CODE> to show the same documentation in the terminal.

Code

Name

Summary

C8101

manifest-required-author

None of the required authors is in the manifest author.

C8102

manifest-required-key

A required key is missing from the manifest.

C8103

manifest-deprecated-key

The manifest uses a deprecated key.

C8105

license-allowed

The manifest license is not in the allowed list.

C8106

manifest-version-format

The manifest version does not follow <odoo series>.x.y.z.

C8107

translation-required

A user-facing string is not translated.

C8108

method-compute

A field’s compute method is not named _compute_....

C8109

method-search

A field’s search method is not named _search_....

C8110

method-inverse

A field’s inverse method is not named _inverse_....

C8111

development-status-allowed

The manifest development_status is not an allowed value.

C8112

missing-readme

The module has no README.

C8113

no-wizard-in-models

A wizard (TransientModel) is defined in the models folder.

C8114

category-allowed

The manifest category is not in the allowed list.

C8115

missing-odoo-file

A file required for paid apps is missing (configurable list).

C8116

manifest-superfluous-key

A manifest key is set to its default value.

C8117

category-allowed-app

The category of a paid app is not an Odoo Apps store category.

C8118

missing-odoo-file-app

A paid app has no static/description/index.html.

C8119

manifest-required-key-app

A key required for paid apps is missing from the manifest.

C8120

manifest-summary-multiline

The manifest summary spans several lines.

E0001

syntax-error

A Python file cannot be parsed.

E8101

manifest-author-string

The manifest author is not a string.

E8102

invalid-commit

The database transaction is committed by hand.

E8103

sql-injection

SQL passed to execute() is built with string formatting.

E8104

manifest-maintainers-list

The manifest maintainers is not a list of strings.

E8106

external-request-timeout

An external request has no timeout.

E8130

test-folder-imported

tests is imported from a package __init__.py.

E8135

no-write-in-compute

A compute method calls write().

E8140

no-raise-unlink

unlink() raises an exception.

E8145

manifest-behind-migrations

The manifest version is lower than a migration folder.

E8146

deprecated-name-get

A model defines name_get, replaced by _compute_display_name.

E8147

inheritable-method-string

A field passes a method object instead of its name.

E8148

inheritable-method-lambda

A field passes a method object as default or domain.

E8149

deprecated-inselect-operator

A domain uses the deprecated inselect operator.

E8151

translation-injection

.format() is called on a translated string.

E8300

translation-unsupported-format

A translated string has an invalid % conversion character.

E8301

translation-format-truncated

A translated format string ends in the middle of a % conversion.

E8305

translation-too-many-args

_() gets more arguments than its format string uses.

E8306

translation-too-few-args

_() gets fewer arguments than its format string needs.

F8101

resource-not-exist

A data file listed in the manifest does not exist.

MOD001

manifest-syntax-error

The manifest could not be loaded.

MOD002

file-not-used

A data file is not referenced in the manifest.

MOD003

csv-syntax-error

A CSV file the manifest lists cannot be read.

MOD004

csv-duplicate-record-id

Two CSV records of a manifest key have the same id.

MOD005

prefer-readme-rst

The module has a README.md instead of a README.rst.

MOD006

weblate-component-too-long

Repository name, Odoo version and module name are too long for a Weblate component.

MOD007

unused-logger

_logger = logging.getLogger(__name__) is never used.

MOD008

use-header-comments

A Python file starts with comments such as a copyright header.

MOD009

field-string-redundant

A field’s string is the label Odoo derives from its name anyway.

ODOO001

missing-depends

Compute method referenced by compute= lacks @api.depends.

ODOO002

module-unwanted-file

A package, archive, executable, database dump or video inside a module.

ODOO003

module-large-file

A file inside a module is larger than the limit (1 MiB by default).

ODOO004

view-field-not-found

A view uses a field that does not exist on its model.

ODOO005

xml-id-not-found

A reference to an XML id that does not exist, comes from outside depends, or is loaded later.

ODOO006

model-not-found

A model that no module of depends defines.

ODOO007

python-field-not-found

Python code names a field the model does not have.

PO001

po-syntax-error

A PO file cannot be parsed.

PO002

po-requires-module

A translation entry lacks its #. module: comment.

PO003

po-python-parse-printf

A translation does not match the % placeholders of its source.

PO004

po-python-parse-format

A translation does not match the {} placeholders of its source.

PO005

po-duplicate-message-definition

The same msgid is translated more than once.

PO006

po-duplicate-model-definition

The same model: reference is translated more than once.

PO007

po-pretty-format

A PO file is not formatted the way Odoo exports it.

PO101

po-not-in-pot

A translation is ignored because its msgid is missing from the module’s .pot.

PO102

po-unknown-occurrence

Odoo cannot read a #: reference of a translation.

PO103

po-file-name

Odoo never loads a .po file with this name.

PO104

po-fuzzy

A translation is marked fuzzy, but Odoo loads it anyway.

R8101

odoo-exception-warning

odoo.exceptions.Warning is imported.

R8180

consider-merging-classes-inherited

Several classes in one module extend the same model.

R8181

invalid-email

The manifest support is not a valid email address.

U1601

upgrade-extension-view-groups

An extension view sets groups_id, rejected since Odoo 16.0.

U1602

upgrade-html-field-type

body_html of a mail template loaded with type="xml", deprecated in Odoo 16.0.

U1603

upgrade-assets-qweb

The manifest adds templates to web.assets_qweb, removed in Odoo 16.0.

U1604

upgrade-removed-asset-bundles-16

The manifest uses an asset bundle removed in Odoo 16.0.

U1605

upgrade-manifest-qweb

The manifest lists templates under qweb, which Odoo ignores.

U1606

upgrade-ir-translation

Python code uses ir.translation, removed in Odoo 16.0.

U1607

upgrade-request-api

request.jsonrequest, or an assignment to request.context/request.uid, removed in Odoo 16.0.

U1608

upgrade-binary-content

ir.http.binary_content(), removed in Odoo 16.0.

U1609

upgrade-search-args

search(args=...), renamed domain= in Odoo 16.0.

U1610

upgrade-osv-query

odoo.osv.query, moved to odoo.tools.query in Odoo 16.0.

U1611

upgrade-fields-view-get

A fields_view_get override, no longer called by the web client since Odoo 16.0.

U1701

upgrade-attrs-states

A view uses attrs or states, rejected since Odoo 17.0.

U1702

upgrade-list-column-invisible

A list column hidden with invisible, which only hides the cells since Odoo 17.0.

U1703

upgrade-report-act-window-tags

<report> or <act_window>, removed in Odoo 17.0.

U1704

upgrade-calendar-quick-add

A calendar view uses quick_add, renamed quick_create in Odoo 17.0.

U1705

upgrade-view-active-id

A view expression uses active_id directly, deprecated in 17.0 and rejected in 18.0.

U1706

upgrade-server-action-lines

A server action uses fields_lines/ir.server.object.lines, removed in Odoo 17.0.

U1707

upgrade-view-field-parent

A view record sets field_parent, removed in Odoo 17.0.

U1708

upgrade-view-qweb-directives

A view uses a QWeb directive Odoo 17.0 forbids in views.

U1709

upgrade-name-get

name_get, no longer used for display names since Odoo 17.0.

U1710

upgrade-name-search-signature

A _name_search override with the 16.0 signature (args, name_get_uid).

U1711

upgrade-search-count-true

search(..., count=True), removed in Odoo 17.0.

U1712

upgrade-removed-recordset-methods

A recordset method deprecated in 16.0 and removed in 17.0.

U1713

upgrade-field-states

A field uses states=, ignored since Odoo 17.0.

U1714

upgrade-savepoint-case

SavepointCase/HttpSavepointCase, removed in Odoo 17.0.

U1715

upgrade-old-exceptions

odoo.exceptions.Warning or except_orm, removed in Odoo 17.0.

U1716

upgrade-onchange-domain

An onchange returns a domain, ignored since Odoo 17.0.

U1717

upgrade-norecompute

env.norecompute(), a no-op since Odoo 17.0.

U1718

upgrade-ir-default-get

ir.default.get(), renamed _get() in Odoo 17.0.

U1719

upgrade-private-read-group

_read_group called with the 16.0 signature (lazy, orderby, fields).

U1720

upgrade-openerp-manifest

The manifest is __openerp__.py, deprecated in 17.0 and not found by 19.0.

U1721

upgrade-removed-asset-bundles

The manifest adds files to an asset bundle removed in Odoo 17.0.

U1801

upgrade-tree-view

A view uses <tree>, renamed <list> in Odoo 18.0.

U1802

upgrade-view-mode-tree

An action’s view_mode says tree, renamed list in Odoo 18.0.

U1803

upgrade-tree-reference

An xpath, mode or tree_view_ref refers to tree, renamed list in Odoo 18.0.

U1804

upgrade-cron-numbercall

A scheduled action sets numbercall or doall, removed in Odoo 18.0.

U1805

upgrade-default-period

A date filter’s default_period uses a name Odoo 18.0 replaced.

U1806

upgrade-kanban-box

A kanban view uses the kanban-box template, replaced by card in Odoo 18.0.

U1807

upgrade-group-operator

A field uses group_operator=, renamed aggregator= in Odoo 18.0.

U1808

upgrade-user-has-groups

user_has_groups(), removed in Odoo 18.0, is called.

U1809

upgrade-python-tree-view

Python code refers to the tree view type, renamed list in Odoo 18.0.

U1810

upgrade-name-search-override

A model overrides _name_search, which Odoo 18.0 no longer calls.

U1901

upgrade-env-shortcuts

._uid, ._context or request.cr/uid/context, deprecated in Odoo 19.0.

U1902

upgrade-sql-constraints

_sql_constraints, silently ignored since Odoo 19.0.

U1903

upgrade-api-model-create

create is decorated with @api.model, which makes it a batch create in Odoo 19.0.

U1904

upgrade-api-returns

@api.returns, removed in Odoo 19.0.

U1905

upgrade-read-group-override

A model overrides read_group, which the web client no longer calls in Odoo 19.0.

U1906

upgrade-route-json

A route uses type='json', renamed 'jsonrpc' in Odoo 19.0.

U1907

upgrade-python-groups-id

Python code uses groups_id, renamed group_ids in Odoo 19.0.

U1908

upgrade-osv-expression

odoo.osv.expression is imported, deprecated in Odoo 19.0 and removed in 20.0.

U1909

upgrade-auto-join

A field uses auto_join=, renamed bypass_search_access= in Odoo 19.0.

U1910

upgrade-name-search-args

name_search(args=...), renamed domain= in Odoo 19.0.

U1911

upgrade-clear-caches

clear_caches(), removed in Odoo 19.0.

U1912

upgrade-removed-helpers

get_module_resource, get_resource_path or odoo.registry(), removed in Odoo 19.0.

U1913

upgrade-sequence-get

ir.sequence get()/get_id(), removed in Odoo 19.0.

U1914

upgrade-domain-operators

A domain uses <>, == or an upper-case operator, deprecated in Odoo 19.0.

U1915

upgrade-models-newid

from odoo.models import NewId, which fails in Odoo 19.0.

U1916

upgrade-groups-id

A record or view uses groups_id, renamed group_ids in Odoo 19.0.

U1917

upgrade-search-group-attributes

A search view’s <group> has expand or string, rejected in Odoo 19.0.

U1918

upgrade-groups-users

A res.groups record sets users, renamed user_ids in Odoo 19.0.

U1919

upgrade-manifest-old-data-keys

The manifest lists files under update_xml or demo_xml, ignored since Odoo 19.0.

U1920

upgrade-t-call-element

t-call on an element other than <t>, rejected in Odoo 19.0.

U1921

upgrade-partner-mobile-title

A partner or company view uses mobile or title, removed in Odoo 19.0.

U2001

upgrade-ir-model-access-csv

The manifest loads ir.model.access.csv, a model replaced by ir.access in Odoo 20.0.

U2002

upgrade-ir-access-records

ir.rule or ir.model.access records, models replaced by ir.access in Odoo 20.0.

U2003

upgrade-t-esc-t-raw

t-esc or t-raw, removed from QWeb in Odoo 20.0.

U2004

upgrade-t-call-body

t-set inside a t-call, no longer passed to the template in Odoo 20.0.

U2005

upgrade-t-call-options

t-call-options, removed in Odoo 20.0.

U2006

upgrade-base64-file-field

<field type="base64" file=...>, deprecated for type="bytes" in Odoo 20.0.

U2007

upgrade-attachment-datas-xml

An ir.attachment record sets datas, removed in Odoo 20.0.

U2008

upgrade-report-file

A report sets report_file, removed in Odoo 20.0.

U2009

upgrade-font-awesome

A Font Awesome icon, which Odoo 20.0 no longer loads.

U2010

upgrade-filter-date-range

A search filter uses start_month/end_month/start_year/end_year, removed in Odoo 20.0.

U2011

upgrade-calendar-date-delay

A calendar view uses date_delay, removed in Odoo 20.0.

U2012

upgrade-bank-account-fields

A res.partner.bank view or record uses a field renamed in Odoo 20.0.

U2013

upgrade-partner-company-fields

A partner or company view uses company_type, company_name or company_registry, removed in Odoo 20.0.

U2014

upgrade-widget-renames

widget="remaining_days", renamed relative_date in Odoo 20.0.

U2015

upgrade-jquery-bundle

The manifest includes web._assets_jquery, removed in Odoo 20.0.

U2016

upgrade-manifest-init-xml

The manifest lists files under init_xml, ignored since Odoo 20.0.

U2017

upgrade-config-parameter

ir.config_parameter get_param/set_param, removed in Odoo 20.0.

U2018

upgrade-attachment-datas

ir.attachment datas, removed in Odoo 20.0.

U2019

upgrade-ir-access-models

Python code uses ir.model.access or ir.rule, replaced by ir.access in Odoo 20.0.

U2020

upgrade-removed-access-methods

An access or recursion method removed in Odoo 20.0.

U2021

upgrade-read-group-signature

read_group called with the 19.0 signature (lazy, orderby, fields).

U2022

upgrade-registry-clear-cache

registry.clear_cache(), removed in Odoo 20.0.

U2023

upgrade-ormcache-import

ormcache imported from odoo.tools, deprecated in Odoo 20.0.

U2024

upgrade-http-imports

A name imported from odoo.http that moved to a submodule in Odoo 20.0.

U2025

upgrade-tools-imports

A name imported from odoo.tools that moved or was removed in Odoo 20.0.

U2026

upgrade-bank-account-fields-python

Python code uses a res.partner.bank field renamed in Odoo 20.0.

U2027

upgrade-partner-company-fields-python

Python code uses company_type, company_registry or create_company, removed in Odoo 20.0.

U2028

upgrade-self-writeable-fields

SELF_READABLE_FIELDS/SELF_WRITEABLE_FIELDS, replaced in Odoo 20.0.

U2029

upgrade-inherit-read

Code reads ._inherit at runtime, which raises in Odoo 20.0.

U2030

upgrade-test-classes

SingleTransactionCase or odoo.tests.common.Form, removed in Odoo 20.0.

W8103

translation-field

A field label is wrapped in _().

W8105

attribute-deprecated

A model uses a deprecated class attribute.

W8106

method-required-super

An override of a core method does not call super().

W8107

prohibited-method-override

A method that must not be overridden is overridden.

W8110

missing-return

A method calls super() but does not return anything.

W8111

renamed-field-parameter

A field uses a parameter that was renamed.

W8113

attribute-string-redundant

A field label repeats what Odoo derives from the field name.

W8114

website-manifest-key-not-valid-uri

The manifest website is not a valid http(s) URL.

W8115

translation-contains-variable

A translated string is formatted inside _() (Odoo 13.0 and earlier).

W8116

print-used

print() is used instead of a logger.

W8120

translation-positional-used

A translated string has several positional placeholders.

W8121

context-overridden

with_context() replaces the whole context.

W8125

manifest-data-duplicated

A data file is listed more than once in the manifest.

W8138

except-pass

An except block only contains pass.

W8150

odoo-addons-relative-import

A module imports itself through odoo.addons.<module>.

W8155

bad-builtin-groupby

itertools.groupby is used instead of odoo.tools.groupby.

W8160

deprecated-odoo-model-method

A model overrides a method Odoo deprecated.

W8161

prefer-env-translation

_() is used instead of self.env._().

W8162

manifest-external-assets

An asset in the manifest is loaded from an external URL.

W8163

no-search-all

search([]) without a limit loads every record.

W8164

super-method-mismatch

A method calls super() on a different method.

W8165

deprecated-self-cr

self._cr is used instead of self.env.cr.

W8202

use-vim-comment

A file contains a vim modeline comment.

W8301

translation-not-lazy

A string is formatted with % or + before it is translated.

W8302

translation-format-interpolation

A string is formatted with .format() before it is translated.

W8303

translation-fstring-interpolation

An f-string is translated.

XML001

xml-syntax-error

An XML file the manifest loads cannot be read or parsed.

XML002

xml-header-missing

An XML file has no <?xml ... ?> declaration.

XML003

xml-header-wrong

The XML declaration is not <?xml version="1.0" encoding="UTF-8" ?>.

XML004

xml-record-missing-id

A <record> or <menuitem> has no id.

XML005

xml-duplicate-record-id

Two records of a module have the same XML id.

XML006

xml-duplicate-fields

A record sets the same field twice.

XML007

xml-duplicate-template-id

Two templates of a module have the same id.

XML008

xml-redundant-module-name

A record id repeats the name of its own module.

XML009

xml-tag-position

t-if, id or class attributes are not first in a tag.

XML010

xml-deprecated-data-node

A <data> element is the only child of <odoo>.

XML011

xml-deprecated-openerp-node

The root element is <openerp>.

XML012

xml-deprecated-qweb-directive

A template uses t-esc-options, t-field-options or t-raw-options.

XML013

xml-deprecated-qweb-directive-15

A template uses t-esc or t-raw, deprecated in Odoo 15.0.

XML014

xml-deprecated-tree-attribute

A <tree> view uses string, colors or fonts.

XML015

xml-deprecated-oe-chatter

A form uses <div class="oe_chatter"> instead of <chatter/>.

XML016

xml-deprecated-res-groups-category-id

A res.groups record sets category_id, removed in Odoo 19.0.

XML017

xml-view-dangerous-replace-low-priority

A view replaces part of another with a priority below 99.

XML018

xml-dangerous-qweb-replace-low-priority

A template replaces part of another with a priority below 99.

XML019

xml-create-user-wo-reset-password

A res.users record is created without no_reset_password.

XML020

xml-not-valid-char-link

A local href/src has no plain file extension.

XML021

xml-xpath-translatable-item

An <xpath> selects an element by its translatable text.

XML022

xml-oe-structure-missing-id

An oe_structure element has no id containing oe_structure.

XML023

xml-field-bool-without-eval

A boolean field is set as text instead of with eval.

XML024

xml-field-numeric-without-eval

A numeric field is set as text instead of with eval.

XML101

xml-bootstrap4-class

A Bootstrap 4 class that Bootstrap 5 renamed, in Odoo 15.0 or later.

XML102

xml-bootstrap4-removed-class

A Bootstrap 4 class that Bootstrap 5 removed, in Odoo 15.0 or later.