Skip to main content

Build Status codecov code-style-black version pypi-downloads-monthly supported-versions wheel commits-since

Pylint Odoo plugin

Enable custom checks for Odoo modules.

Short Name Description Code
attribute-deprecated attribute "%s" deprecated W8105
attribute-string-redundant The attribute string is redundant. String parameter equal to name of variable W8113
bad-builtin-groupby Used builtin function itertools.groupby. Prefer odoo.tools.groupby instead. More info about https://github.com/odoo/odoo/issues/105376 W8155
category-allowed Category "%s" not allowed in manifest file. C8114
category-allowed-app Category "%s" not allowed in manifest file for modules with price. C8117
consider-merging-classes-inherited Consider merging classes inherited to "%s" from %s. R8180
context-overridden Context overridden using dict. Better using kwargs with_context(**%s) or with_context(key=value) W8121
deprecated-inselect-operator The domain operator %r is deprecated in Odoo 18.0+. Use 'in' SQL or 'not in' SQL instead. More info at https://github.com/odoo/odoo/pull/171371 E8149
deprecated-name-get 'name_get' is deprecated. Use '_compute_display_name' instead. More info at https://github.com/odoo/odoo/pull/122085. E8146
deprecated-odoo-model-method %s has been deprecated by Odoo. Please look for alternatives. W8160
deprecated-self-cr Use "self.env.cr" instead of "self._cr" (deprecated since 19.0) W8165
development-status-allowed Manifest key development_status "%s" not allowed. Use one of: %s. C8111
except-pass pass into block except. If you really need to use the pass consider logging that exception W8138
external-request-timeout Use of external request method %s without timeout. It could wait for a long time E8106
inheritable-method-lambda Use %s=lambda self: self.%s() to preserve inheritability. More info at https://github.com/OCA/odoo-pre-commit-hooks/issues/126 E8148
inheritable-method-string Use string method name "%s" to preserve inheritability. More info at https://github.com/OCA/odoo-pre-commit-hooks/issues/126 E8147
invalid-commit Use of cr.commit() directly - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#never-commit-the-transaction E8102
invalid-email Invalid email "%s" R8181
license-allowed License "%s" not allowed in manifest file. C8105
manifest-author-string The author key in the manifest file must be a string (with comma separated values) E8101
manifest-behind-migrations Manifest version (%s) is lower than migration scripts (%s) E8145
manifest-data-duplicated The file "%s" is duplicated in lines %s from manifest key "%s" W8125
manifest-deprecated-key Deprecated key "%s" in manifest file C8103
manifest-external-assets Asset %s should be distributed with module's source code. More info at https://httptoolkit.com/blog/public-cdn-risks/ W8162
manifest-maintainers-list The maintainers key in the manifest file must be a list of strings E8104
manifest-required-author One of the following authors must be present in manifest: %s C8101
manifest-required-key Missing required key "%s" in manifest file C8102
manifest-required-key-app Missing required key "%s" in manifest file for modules with price. C8119
manifest-summary-multiline Summary in manifest file should be a one-line short description, found newline character C8120
manifest-superfluous-key Manifest superfluous key "%s". It is the same as the default value: %s. Better remove it C8116
manifest-version-format Wrong Version Format "%s" in manifest file. Regex to match: "%s" C8106
method-compute Name of compute method should start with "compute" C8108
method-inverse Name of inverse method should start with "inverse" C8110
method-required-super Missing super call in "%s" method. W8106
method-search Name of search method should start with "search" C8109
missing-odoo-file Missing %s file C8115
missing-odoo-file-app Missing %s file for modules with price C8118
missing-readme Missing ./README.rst file. Template here: %s C8112
missing-return Missing return (super is used) in method %s. W8110
no-raise-unlink No exceptions should be raised inside unlink() functions E8140
no-search-all Using an empty domain %s([]) without a limit will load all records, may impact performance. W8163
no-wizard-in-models No wizard class for model directory. See the complete structure https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#complete-structure C8113
no-write-in-compute Compute method calling write. Use update instead. E8135
odoo-addons-relative-import Same Odoo module absolute import. You should use relative import with "." instead of "odoo.addons.%s" W8150
odoo-exception-warning odoo.exceptions.Warning is a deprecated alias to odoo.exceptions.UserError use from odoo.exceptions import UserError R8101
prefer-env-translation Better using self.env._ More info at https://github.com/odoo/odoo/pull/174844 W8161
print-used Print used. Use logger instead. W8116
prohibited-method-override Prohibited override of "%s" method. W8107
renamed-field-parameter Field parameter "%s" is no longer supported. Use "%s" instead. W8111
resource-not-exist File "%s": "%s" not found. F8101
sql-injection SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection E8103
super-method-mismatch super().%s mismatch but defined method is %s W8164
test-folder-imported Test folder imported in module %s E8130
translation-contains-variable Translatable term in "%s" contains variables. Use %s instead W8115
translation-field Translation method _("string") in fields is not necessary. W8103
translation-format-interpolation Use %s formatting in odoo._ functions W8302
translation-format-truncated Logging format string ends in middle of conversion specifier E8301
translation-fstring-interpolation Use %s formatting in odoo._ functions W8303
translation-injection Do not use str.format on translation methods. Use placeholders instead. Reference: https://lucumr.pocoo.org/2016/12/29/careful-with-str-format/ E8151
translation-not-lazy Use %s formatting in odoo._ functions W8301
translation-positional-used Translation method _(%s) is using positional string printf formatting with multiple arguments. Use named placeholder _("%%(placeholder)s") instead. W8120
translation-required String parameter on "%s" requires translation. Use %s%s(%s) C8107
translation-too-few-args Not enough arguments for odoo._ format string E8306
translation-too-many-args Too many arguments for odoo._ format string E8305
translation-unsupported-format Unsupported odoo._ format character %r (%#02x) at index %d E8300
use-vim-comment Use of vim comment W8202
website-manifest-key-not-valid-uri Website "%s" in manifest key is not a valid URI. %s W8114

Install

You do not need to install manually if you use pre-commit-config

But if you even need to install it

pip install pylint-odoo

Usage pre-commit-config.yaml

Add to your ".pre-commit-config.yaml" configuration file the following input

    - repo: https://github.com/OCA/pylint-odoo
        rev: v10.0.9 # may be a tag or commit hash
        hooks:
        # Add to your .pylintrc file:
        # [MASTER]
        # load-plugins=pylint_odoo
        - id: pylint_odoo

Usage

pylint --load-plugins=pylint_odoo -e odoolint path/to/test

or use configuration file you can generate the OCA one using the following template repository:

https://github.com/OCA/oca-addons-repo-template

Then running

pylint --rcfile=.pylintrc path/to/test

Example to test only pylint_odoo checks:

pylint --load-plugins=pylint_odoo -d all -e odoolint {ADDONS-PATH}/*

There are checks only valid for a particular Odoo version To know what version of odoo are you running pylint needs the parameter

pylint --load-plugins=pylint_odoo --valid-odoo-versions={YOUR_ODOO_VERSION}

with particular odoo version e.g. "16.0"

Check valid only for odoo >= 18.0

prefer-env-translation

Checks valid only for odoo >= 14.0

translation-format-interpolation
translation-format-truncated
translation-fstring-interpolation
translation-not-lazy
translation-too-few-args
translation-too-many-args
translation-unsupported-format

Checks valid only for odoo <= 13.0

translation-contains-variable

Examples

Development

To run all the tests run:

tox

Use extra parameters to change the test behaviour

e.g. particular python version

tox -e py310

e.g. particular unittest method

tox -e py310 -- -k test_20_expected_errors

e.g. all the tests at the same time in parallel

tox -p auto

Licenses

This repository is licensed under AGPL-3.0.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

CHANGES

v10.0.9

  • [FIX] tests: Close the coverage in-memory databases of the reports
  • [FIX] misc, plugin: Support pylint --jobs on python 3.15
  • [REF] tests: Assert the --jobs output matches the serial mode
  • [FIX] odoo_addons: Aggregate consider-merging-classes-inherited using --jobs
  • [FIX] plugin: Do not register the checkers twice using --jobs
  • [IMP] odoo_addons: Skip import checks if the messages are disabled
  • [REF] misc: Re-use known parent paths in walk_up
  • [REF] misc: Infer the git top path without spawning a subprocess

v10.0.8

  • [REF] tests: Parametrize checks2exclude by odoo_version
  • [ADD] deprecated-self-cr: Detect usage of deprecated self._cr

v10.0.7

  • [FIX] invalid-name: false positive for executable with .py extension (#576)

v10.0.6

  • [FIX] translation-injection: avoid AttributeError on non-attribute calls (#573)

v10.0.5

  • [FIX] translation-injection: Detect `format` after translation (#572)
  • [REF] github-actions: Use py3.15-dev, update hooks and actions versions (#570)

v10.0.4

  • [ADD] manifest-summary-multiline: Detect newline characters in manifest summary field (#565)

v10.0.3

  • [ADD] translation-injection: Detect str.format() inside Odoo translation methods (#569)
  • [REF] .pre-commit-config.yaml: Update Prettier 3.x (#567)

v10.0.2

  • [ADD] deprecated-inselect-operator: The domain operator "inselect" were deprecated from Odoo 18.0+ (#564)

v10.0.1

  • [FIX] translation-required: Suggest `self.env._` only for Odoo 18.0+ (#563)

v10.0.0

  • [REF] requirements.txt: Update to pylint v4 (#541)

v9.3.23

  • [REF] tox, github: Enable tox env 'multi' to run multiple jobs (#562)
  • [REF] github: Use py3.14 stable (#561)
  • [REF] tests: Migrating unittest to pytest (#560)
  • [FIX] attribute-string-redundant: Fix false positive for related fields (#559)
  • [REF] pylint: Remove DeprecationWarning importing from 'astroid' is deprecated and will be removed in v5 (#558)
  • [REF] github: The macOS-13 based runner images are now retired. (#557)
  • [REF] manifest-superfluous-key: Add superfluous test case for 'auto_install: False' (#556)
  • [REF] manifest-required-key: Removing empty space parsed with binary operator (#554)

v9.3.22

  • [ADD] missing-odoo-file-app,manifest-required-key-app,category-allowed-app: Add separated checks for modules with price (#553)

v9.3.21

  • [ADD] manifest-superfluous-key: Detects useless key from manifest files (#552)
  • [REF] invalid-name: Disable unitest for windows (#551)

v9.3.20

  • [IMP] invalid-name: bypass invalid-name for module name if it is executable (#550)

v9.3.19

  • [FIX] manifest-required-key: Fix false positive for apps (#549)

v9.3.18

  • [REF] super-method-mismatch: Consider queue and cache defined methods as valid (#548)

v9.3.17

  • [REF] category-allowed: Restrict categories to match Odoo Apps filters only for apps (#547)
  • [ADD] super-method-mismatch: Check super() calls match current method (#546)

v9.3.16

  • [IMP] context-overridden: Support valid case for odoo.tools.clean_context (#545)

v9.3.15

  • [REF] pylint_odoo: misc regex odoo version adapt for 19 (#544)

v9.3.14

  • [FIX] translation-format-interpolation: Fix false negative for translate using "".format() style (#543)
  • [REF] github-actions: Use codecov token from secrets (#542)

v9.3.13

  • [REF] custom_logging: Revert invalid case for logging but valid for translations
  • [REF] *: Adapt code to be compatible with pylint4 (early)
  • [REF] github-actions: Use py3.14 pre-release (#540)

v9.3.12

  • [ADD] invalid-email, manifest-required-key(app), missing-odoo-file: New checks for apps (#538)

v9.3.11

  • [FIX] translation-required: Fix TypeError `None >= ()` (#536)

v9.3.10

  • [REF] translation-required: Use translation method based on the Odoo version (#535)

v9.3.9

  • [REF] attribute-string-redundant, manifest-external-assets, method-*, translation-required: Add support for f-string (#534)
  • [REF] *: Small changes (#533)

v9.3.8

  • [FIX] no-search-all: Fix `domain` variable used before to be assigned (#532)

v9.3.7

  • [ADD] no-search-all: No search with empty domain (#531)

v9.3.6

  • [FIX] inheritable-method-*: Consider only methods from classes (#530)

v9.3.5

  • [ADD] inheritable-method-lambda: Add check to be inheritable the domain and default using lambda (#529)

v9.3.4

  • [ADD] string-method-name: Add string-method-name check to preserve inheritability (#528)

v9.3.3

  • [FIX] prohibited-method-override: Check if caller has a func attribute (#524)
  • [ADD] deprecated-name-get: name_get deprecated since v17
  • [ADD] manifest-external-assets: No external sources for assets (#525)

v9.3.2

  • [FIX] manifest-version-format: Catch ValueError exception for valid-odoo-versions parameter (#520)
  • [REF] website-manifest-key-not-valid-uri: Remove dependency to validators
  • [REF] manifest-behind-migrations: Transform version to tuple without packaging library

v9.3.1

  • [ADD] prefer-env-translation: Add new check for odoo v18.0 (#516)
  • [REF] tests: Support pdb to debug pylint checks (#517)

v9.3.0

  • [REF] pylint_odoo: Update pylint version and drop support for py38 (#515)

v9.2.0

  • [REF] tox: Using py3.13 for update-readme (#511)
  • [FIX] pylint_odoo: Fix parsing dictionary from manifest (#510)
  • [FIX] translation-not-lazy: Fix AstroidSyntaxError (#509)
  • [FIX] pylint_odoo: Fix IndexError corner case (#508)
  • [FIX] requirements.txt: Add missing 'packaging' package (#507)
  • [REF] github: Updated codecov action version (#506)
  • [REF] pylint_odoo: Avoid reassigning self.linter.config (#505)
  • [REF] tests: Detecting duplicated lines occurrences (#504)
  • [REF] tests: Test "jobs" counting lines from the output (#503)
  • [REF] tox: Add py3.13 environment
  • [IMP] manifest-behind-migrations: Improve detection of the check only using odoo manifest file parsing
  • [REF] pylint_odoo: Enabling python version 3.13 compatibility (#501)

v9.1.4

  • [FIX] pylint_odoo: Fix walk-up normalizing windows OS separator // vs \
  • [IMP] pylint_odoo: Supporting multi-jobs
  • [REF] coverage: Remove "dynamic_context=test_function"
  • [REM] pylint_odoo: Remove requirements/requirements.txt from build

v9.1.3

  • [REF] pylint-odoo: Add support for odoo 18.0 (#497)
  • [REF] readme: translation-positional-used desc. (#496)
  • [REF] setup: Add setuptools deps to build
  • [REF] github-action: Add compatibility with MacOSX M1

v9.1.2

  • [REF] setup: Add py3.12 support info (#490)

v9.1.1

  • [REF] update-readme
  • [ADD] prohibited-method-override: New check to avoid overriding methods (#485)
  • [REF] .github: Update actions cache and fix pre-commit cache path (#489)

v9.1.0

  • [REF] requirements: Update packages version (#488)

v9.0.6

  • [REF] requirements: Compatibility with validators 0.22

v9.0.5

  • [FIX] odoo-addons-relative-import: exclude migrations (#481)

v9.0.4

  • [REF] readme: Update readme using 'tox -e update-readme'

v9.0.3

  • [ADD] manifest-behind-migrations: check manifest version >= migrations (#475)

v9.0.2

  • [REF] Add support to Odoo v17.0 (#477)

v9.0.1

  • [ADD] category-allowed: Add check to enforce the allowed Odoo modules categories (#459)

v9.0.0

  • [REF]: update to pylint 3.0.0, drop support for py3.7 (#474)

v8.0.22

  • [REF] setup.py: Filter out "bump version" from CHANGELOG (#472)

v8.0.21

  • [ADD] deprecated-odoo-model-method: New check to detect deprecated method for each Odoo version (#470)
  • [REF] ci: run only one tox env per job (#468)

v8.0.20

  • [REF] tox: Build ChangeLog again (#466)
  • [ADD] no-raise-unlink: Check if there is raise sentence in unlink method (#458)
  • [FIX] correct README pre-commit usage (#463)

v8.0.19

  • [FIX] pre-commit-vauxoo: Fix isort hook - RuntimeError The Poetry configuration is invalid (#456)

v8.0.18

  • [FIX] Readme: new CLI command format --valid-odoo-version (#453)
  • [REF] ci: Update gh actions .yml and tox.ini (#451)
  • [FIX] pre-commit-config: Update flake8 repo (#446)

v8.0.17

  • [REM] Remove unused eslintrc file
  • [REF] tests: Autogenerate readme with examples from test_repo
  • [REF] tox, pre-commit, readme: Small changes (#443)

v8.0.16

  • [ADD] bad-builtin-groupby: Prefer `odoo.tools.groupby` instead (#442)

v8.0.15

  • [FIX] setup: Add missing "requirements.txt" file to package (#441)

v8.0.14

  • [REF] no-wizard-in-models: Add exception for "res.config*" inherited classes (#439)
  • [ADD] no-wizard-in-models: Add new check for avoid adding wizards class in models directory (#437)

v8.0.13

  • [REF] consider-merging-classes-inherited: Improve message with relpath + column number (#436)

v8.0.12

  • [FIX] consider-merging-classes-inherited: Fix TODO Consider case where _inherit is assigned before to _name (#435)
  • [FIX] custom_logging: Fix AstroidSyntaxError using only binop related to '%' (#434)

v8.0.11

  • [REF] manifest-data-duplicated, resource-not-exist: Improve line number (lineno) of the duplicated node (#433)

v8.0.10

  • [FIX] pylint_odoo: Using node.op instead of hardcoded % (#432)

v8.0.9

  • [FIX] pylint_odoo: "ImportError: No module named 'packaging'" (#431)
  • [REF] readme: Add monthly downloads from pypi badge (#430)
  • [REF] pylint_odoo: Using new typing astroid.nodes instead of astroid.Class (#429)

v8.0.8

  • [ADD] no-write-in-compute: Don't write on a computed field (#427)

v8.0.7

  • [REF] pylint_odoo: Replace options name from "_" to "-" because (#426)

v8.0.6

  • [REF] README: Auto update README (#425)
  • [REF] pylint_odoo: Process max_odoo_version and min_odoo_version for checks (#424)
  • [ADD] translation-*: Add translation-* checks with the same "logging" checks but for "odoo._" translate method (#423)
  • [REF] CI: Enable py3.11 (#420)

v8.0.5

  • [REF] tox: Enable lints from environment list (#418)
  • [REF] setup: Match requires-python = ">=3.7.2" from pylint (#417)
  • [REF] CI: Enable tox with parallels + codecov compatibility (#415)
  • [REF] augmentations: Use message code instead of message id for supression of codes (#414)

v8.0.4

  • [REF] README: Auto-update Using pylint_odoo.messages2md()
  • [REM] class-camelcase: Replaced by invalid-name (#413)
  • [REF] tests: Remove 'score' (#412)
  • [REF] openerp-exception-warning: Change to odoo-exception-warning (#411)
  • [REF] pylint_odoo: Sort items for utils.only_required_for_messages (#410)
  • [IMP] print-used: Speed-up 'print-used' check avoid inferring (#409)
  • [REM] eval-referenced: Replaced by eval-used check from pylint (#408)
  • [REF] pylint_odoo: visit_dict - Use the dictionary key node (#407)

v8.0.3

  • [REF] Update "visit_*" methods availables and order code and update values (#406)
  • [ADD] missing-readme: Add again missing-readme (#405)
  • [REF] pylint_odoo: Clean code (#404)
  • [REF] pylint_odoo: Clean code (#402)

v8.0.2

  • [REF] codecov, README: Enable codecov again and fix URLs from README (#401)

v8.0.1

  • [REF] readme: Migrate from RST to MARKDOWN format (#400)
  • [REF] pylint_odoo: Small changes for CI, lints, pytest and code (#399)
  • [REF] requirements: Update pylint dependency (#398)
  • [IMP] pylint_odoo: black, isort, prettier (#397)

v8.0.0

  • [IMP] pylint_odoo: apocalintSYS - Full refactoring - v8.0.0 (#396)

7.0.4

  • [REF] translation-positional-used: Consider srt.format('{} {}') cases (#395)

7.0.3

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [REF] CI: Comment py3.7 travis with weird error unrelated
  • [ADD] manifest-data-duplicated: Detect duplicated data file

7.0.2

  • [FIX] attribute-string-redundant: Only when field string is the same as title() format (#392)

7.0.1

  • [REF] pylint_odoo: Update supported Odoo version 16.0 (#391)
  • [REF] CI: Use py3.10 and 3.11 environments for travis (#389)
  • [REF] tests: Add unittest to check only one check enabled (#385)

7.0.0

  • [REF] external-request-timeout: Add ftplib.FTP method (#388)
  • Revert "[PERF] *: Checkers only run when enabled #372 (#376)" (#386)
  • [PERF] *: Checkers only run when enabled #372 (#376)
  • [FIX] missing-import-error: add xlrd to whitelist (#379)

6.2.0

  • [IMP] duplicate-po-message-definition: Detecting duplicated only with msgid (#374)
  • [IMP] test-folder-imported: Consider 'from . import test' missing case (#373)

6.1.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [ADD] external-request-timeout: It could wait for a long time (#370)
  • [FIX] .travis.yml: npm v18.0.0 is not compatible with ubuntu used from travis (#371)
  • [REF] README: Use new travis URL (#369)

6.0.0

  • [ADD] pre-commit-hooks: Add pylint_odoo hook to be used from pre-commit.yaml directly (#368)
  • [REF] requirements: Bump pylint package from 2.11.1 to 2.13.5 for py3.x (#367)
  • [FIX] CI: Fix pluggy error on py3.7 and running lint only in one build (#366)
  • [IMP] sql-injection: Detect possible sql injections when using f-strings (#364)
  • [FIX] Pinned lazy-object-proxy for Python 2.7 (#365)
  • [FIX] missing-return: Incorrect check for tearDownClass (#362)

5.0.5

  • [FIX] OdooChecker: Discard migrations folder as odoo main module (#358)

5.0.4

  • Revert "[REVERT] requirements: Using pylint<2.11.0 because issue 5096 (#355)"

5.0.3

  • [REVERT] requirements: Using pylint<2.11.0 because issue 5096 (#355)

5.0.2

  • [REF] requirements: Upgrade pylint version 2.11.1 (#354)

5.0.1

  • [REF] manifest-version-format: Add new valid odoo v15.0 (#353)
  • [REF] sql-injection: No sql-injection using constants (#351)
  • [FIX] sql-injection: AttributeError: 'NoneType' object has no attribute 'parent' (#350)

5.0.0

  • [REF] requirements: Upgrade pylint version (#349)

4.0.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [ADD] dangerous-qweb-replace-wo-priority: Consider qweb view templates (#347)
  • [ADD] context-overridden: Better using kwargs instead of dictionary (#256)
  • [REF] invalid-name, unused-argument: Suppress check for migrations path (#348)

3.10.0

  • [FIX] sql-injection: Fix false positives (#344)
  • [FIX] pylint_odoo: Fix manifest_version_format option ignored (#346)

3.9.0

  • [FIX] translation-required: Skip tests folder (#345)
  • [FIX] xml-syntax-error: Fix crash if a xml has syntax errors (#343)
  • [REF] pylint-odoo: Add .pylintrc example (#325)
  • [FIX] attribute-deprecated: Check only "Model" class' attributes (#342)
  • [FIX] attribute-string-redundant: "string" of related field is taken from the referenced one (#341)
  • [FIX] file-not-used: Fix false positives on Windows (#335)

3.8.0

  • [FIX] Add pbr to requirements (#328)
  • [REF] requirements: upgrade pylint version (#320)

3.7.1

  • [FIX] test-folder-imported: Support all import styles (#315)
  • [FIX] misc.py: Properly support python namespace package when detecting the odoo addon directory (#317)

3.7.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [ADD] translation-positional-used: New check to valid the allow change the order of string formatting (#305)
  • [ADD] str-format-used: Check if str.format was used in translated string (#304)
  • [ADD] test-folder-imported: check if tests folder is imported in init file (#310)

3.6.0

  • [FIX] requirements: fix dependencies break with pip 20.3 Fix #306 (#313)
  • [ADD] add compatibility to v14.0 (#312)

3.5.1

  • [REF] .travis.yml: Enable condition to deploy pypi
  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [FIX] dangerous-view-replace-wo-priority: check all child tags with replace (#309)
  • [ADD] pylint-odoo: add new check to maintainers key in manifest must be a list of str (#308)
  • [REF] development-status-allowed: Explicitly report possible values (#301)
  • [REF] odoo-addons-relative-import: does not apply in tests/ directory (#307)
  • [REF] CI: Enable py3.8 and py3.9 (#294)

3.5.0

  • [FIX] messages2rst: Compatible with more than 3 message items
  • [REF] no-utf8-coding-comment,unnecessary-utf8-coding-comment: Using python version to enable/disable them (#292)
  • [REF] po-msgstr-variables: Check if there is missing 'module:' comment (#291)

3.4.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • Fixing pragma: no cover position
  • [ADD] po-msgstr-variables: Check if string translated can be parsed correctly
  • [ADD] duplicate-po-message-definition, po-syntax-error: Enable PO checks

3.3.2

  • [REF] missing-manifest-dependency: Add openupgradelib as a whitelist. (#288)
  • [FIX] sql-injection: Consider valid arguments built with psycopg2.sql

3.3.1

  • [REF] missing-import-error: Add new packages for Odoo v13.0

3.3.0

  • [REF] requirements.txt: Update packages version (#285)

3.2.0

  • [FIX] get_manifest_file: Get manifest file correctly
  • [FIX] Visit module: manage odoo subdirectories Better way to check whether a path is a path of a subdirectoy of a Odoo module. Before, '/a/b/cc/d' was considered as a subdirectoy of '/a/b/c' because '/a/b/c' in '/a/b/cc/d' == True

3.1.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [FIX] rst_lint: Using UTF-8 encoding by default (#272)
  • [ADD] Possibility of package name include dots
  • [REF] .travis.yml: Using py3.7 stable instead of dev (#271)
  • Improve incoherent-interpreter-exec-perm message
  • Fix incompatibility with isort configuration file
  • [FIX] rst-syntax-error: Using a 0 by default if line None is returned

3.0.3

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • Revert "[ADD] method-default prefix" (#254)

3.0.2

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [REF] CI: Fixing flake8, tests and clean requirements
  • [REF] pylint_odoo: Supports odoo 13.0
  • [ADD] method-default prefix
  • [FIX] .travis.yml: Upgrade nvm version supported for eslint
  • Allow console statements
  • [ADD] print-used: Use _logger instead of print (#241)

3.0.1

3.0.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [REF] sql-injection: Test private attributes (#226)
  • [REF] tox: Upgrade new pylint for py3 (#215)

2.0.2

  • [REF] manifest-required-authors: Support old deprecated parameter

2.0.1

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [DEL] require-jsdoc, keep require-valid-jsdoc
  • [FIX]change the location of Guidelines URL
  • [ADD] development-status-allowed: New check to verity valid development status Fix https://github.com/OCA/pylint-odoo/issues/199
  • [REF] missing-import-error: Check enabled just for odoo <= 11.0
  • Add fuzzy to ES globals
  • Allow usage of `undefined` (#214)
  • Jslint jsdoc relax (#209)
  • [REF] pylint-odoo: Compatibility with python3.7 (#205)
  • [IMP] file-not-used: Ignore unused files into the migrations directory (#213)
  • [IMP] manifest-required-author: Allow multiple possible required authors
  • [FIX] missing-manifest-dependency: Exclude tests directory
  • [FIX] manifest-version-format: Don't ignore valid Odoo versions
  • [FIX] requirements: Include "six" package (#207)

2.0.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [DOC] README.rst: Adding documentation to the way to skip one check based on the Odoo Version
  • [REF] requirements: Bump requirements version
  • Add _register_hook in "no missing return" methods (#201)
  • [ADD] Add new lint to detect variables within translatable strings (#198)
  • [FIX] translation-required: Fix some false positives (#196)
  • [REF] .travis.yml: Allow both W503 and W504 formats (#197)

1.9.5

  • [REF] .travis.yml: Just deploy a env and avoid cleanup before to deploy

1.9.4

  • [REF] pylint_odoo: Increase coverage test
  • [FIX] README.rst: Fix syntax and run check
  • [FIX] don't complain about string attribute nodes in translation check
  • [REF] javascript-lint: Allow to use moment (#189)
  • Allow short ternary expressions
  • [IMP] ESLint usability boost (#185)
  • [REF] javascript-lint: Emit a message if there is internal error
  • [REF] jslintrc: Use of property style for dot-location
  • [REF] The method message_post need the subject and body be translatable
  • [FIX] duplicate-xml-fields: Now consider as duplicated using domain and context values (#172)

1.9.3

  • [REF] pylint_odoo: Use check-name instead of check-code for add_message method (#174)
  • [FIX] pylint_odoo: Change the number of the appearances of the check (#173)
  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [ADD] unnecessary-utf8-coding-comment: The utf8 comment is unnecessary if the version of odoo is 11.0 because use py3 (#168)
  • [FIX] missing-external-dependency: Skip relative imports that starts with dot (#171)
  • [ADD] character-not-valid-in-resource-link: To valid the character '?/#' into the in src/href link (#163)
  • [REF] javascript-lint: Disable comma-dangle and prefer-rest-params checks
  • [REF] .travis.yml: Freeze flake8 version In order to avoid false red if a new check is added
  • [ADD] Add licence OEEL-1 into licence-allowed for module depending on Enterprise (#165)
  • [ADD] xml-deprecated-qweb-directive: Deprecated QWeb directives (#157)
  • [FIX] Add 11.0 as valid Odoo version
  • [FIX] unicode error removing decode and use bytes with bytes - Open file with rb and use bytes with bytes - Use xml_special_char.xml: Use a special char to reproduce a decode error

1.8.2

  • [REF] pylint_odoo: Support python3

1.8.1

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [FIX] deprecated-data-xml-node: Fix false negative with data/record + record for xml nodes (#156)
  • [FIX] disable xml check: get method called when the method is not called directly (#154)
  • [FIX] misc: TypeError argument of type 'NoneType' is not iterable (#150)
  • [FIX] manifest-version-format: Use real dot from regex (#153)
  • [FIX] manifest-version-format: Adds matching for string end to default manifest version format (#155)
  • [ADD] xml-deprecated-tree-attribute: Implements check for deprecated tree attributes (#149)
  • [REF] jslintrc: Disable prefer-spread
  • [IMP] missing-return: Skip missing return if function is a generator (#147)
  • [IMP] missing-return/required-super: setUpClass (#143)
  • [IMP] missing-readme: Check for other supported file names (#140)
  • [REF] jslintrc: Disable prefer-reflect error (#141)
  • [REF] file-not-used: Consider as used the files referenced from report xml files (#138)

1.8.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [REF] cache: Cache other extension files just if is a odoo module (#142)
  • [IMP] pylint_odoo: Skip pylint check on one xml file (#135)
  • [ADD] website-manifest-key-not-valid-uri: For validate if the website into manifest is valid URI (#136)

1.7.0

  • [REF] README: Auto-update Using pylint_odoo.messages2rst()
  • [ADD] pylint_odoo: Adding new check resource-not-exist (#130)
  • [FIX] fields: Validate a assign directly from root class (#116)
  • [FIX] jslintrc: Remove deprecated ecmaFeatures key
  • [ADD] pylint_odoo: Adding check detected tag inside tag and show warning (#129)
  • [REF] Fix typo
  • [REF] jslint: Enable no-comma-dangle check
  • [IMP] sql-injection: support new cases and ignore some false positives (#122)
  • [FIX] xml-attribute-translatable: Skip if version is different 8.0 (#117)
  • [FIX] deprecated-module: Consider 'from openerp.osv.expression'

1.6.0

  • [REF] README: Auto-update Using the following script: 'PYTHONPATH=~/odoo/pylint-odoo python -c "import pylint_odoo;print pylint_odoo.messages2rst()"'
  • [REF] .travis.yml: Renamed flake8 error from F999 to F601 (#115)
  • [FIX] Check file-not-used: Skip tests folders (#114)
  • [FIX] incoherent-interpreter-exec-perm: Skip check for windows (#113)
  • [ADD] except-pass: Emit message If a except:pass is used (#107)
  • [FIX] attribute-string-redundant: Add "isinstance" validation for nodes
  • [ADD] attribute-string-redundant: Check if "string" parameter is equal to variable name (#100)
  • [ADD] renamed-field-parameter: Detect deprecated field values (digits_compute, select) (#99)
  • [REF] javascript-lint: Use eslint instead of jshint (#97)
  • [ADD] xml-attribute-translatable: Check XML attribute without translation parameter (#105)
  • [REF] incoherent-interpreter-exec-perm: Better message (#106)
  • [IMP] pylint-odoo: Adding support for parameters --ignore and --ignore-patterns (#103)
  • [ADD] eval-referenced: Detects if a "eval" is referenced (without call it) (#101)
  • [FIX] duplicate-xml-fields: False red using 2 tree sub-views *2M fields (#96)
  • [FIX] method-NAME: Fix if value is not a string
  • [REF] misc: Remove deprecated method
  • [FIX] test: Never use global into test

1.5.0

  • [REF] duplicate-xml-record-id: Get xml section from manifest to skip different origin (#89)
  • [FIX] method-NAME: Fix case compute=None Fix OCA/pylint-odoo#88

1.4.0

  • [REF] attribute-deprecated: Deprecate length class attribute (#86)
  • [ADD] missing-return If you use call a `super` method then you will need return the original value. If you want overwrite a original method then you need add documentation of why and add a `pylint: disable=missing-return`
  • [FIX] Whitelist `anybox.testing.openerp` * Add `anybox.testing.openerp` - Fixes #81
  • [FIX] manifest-version-format: Fix regex to use explicit dot instead of any char
  • [FIX] manifest-version-format: Support -e manifest-version-format only
  • [FIX] missing-import-error: Updating libraries used from requirements.txt but not imported or nested imported from odoo
  • [IMP] manifest-version-format: Add valid_odoo_versions parameter to force a valid version of odoo in the manifest version
  • [REF] missing-import-error: Skip test file since these files are loaded only when running tests and in such a case your module and their external dependencies are installed
  • [ADD] Support for 10.0 manifest name
  • [REF] requirements: Update developer version of pylint and astroid

1.3.5

  • Adding isort dependency (#70)

1.3.4

  • [REF] README: Update messages list

1.3.3

  • [ADD] missing-import-error, missing-manifest-dependency
  • [FIX] rst-syntax-error: Skip unknown roles
  • [FIX] rst-syntax-error: Skip unknown directives
  • [REF] global refactoring: better message output and use real file and line number in non-py files (#62)
  • [REF] README: Add examples special folder
  • [REF] checkers: Skip example folder to check lints

1.3.2

  • [REF] README: Update messages list

1.3.1

  • [ADD] file-not-used: Emit message if there are xml, yml, sql or csv files but It isn't referenced from manifest (#53)
  • [ADD] dangerous-view-replace-wo-priority: Check dangerous view with replace but defined with low priority (#55)
  • [ADD] old-api7-method-defined: Emit message if the method defined have (self, cr, uid) (#52)
  • [ADD] odoo-addons-relative-import (#56)
  • [REF] tox: Freeze stable sha pylint20
  • [FIX] consider-merging-classes-inherited: Skip check if has '_name' and fix when you use '_inherit' name out of class attribute . Add more tests
  • [REF] missing-newline-extrafiles: Skip lib folder
  • [FIX] consider-merging-classes-inherited: Fix leaving module isn't a good idea. Better close method
  • [IMP] consider-merging-classes-inherited: Support disable comment
  • [REF] consider-merging-classes-inherited: Use assign node and better message
  • [ADD] consider-merging-classes-inherited
  • [REF] Increase performance
  • [IMP] pylint_odoo: Enable cProfile print stats
  • [IMP] deprecated-module: Add exception for the case of valid openerp.osv.expression (#40)
  • [IMP] sql-injection: Add compatibility with .format (#44)
  • [REF] translation-required: 100% coverage
  • [IMP] translation-required: Support % strings
  • [IMP] translation-required: Support .format
  • [FIX] translation-required: Fix AttributeError 'Getattr' object has no attribute 'name'
  • [IMP] translation-required: Just check odoo exceptions
  • [FIX] odoolint: Remove unsafe eval and reduce mccabe rate

1.3.0

  • [REF] README: Add new checks (#36)
  • [FIX] duplicate-xml-fields: Support security xml style (#35)
  • [ADD] sql-injection: Add new check to avoid sql injection (#29)
  • [FIX] missing-newline-extrafiles: Fix 'IOError: [Errno 22] Invalid argument' by files of size 2 (#37)
  • [REF] README: Add new checks
  • [ADD] method-param: Check param method starts with "_param_" (#33)
  • [FIX] join_node_args_kwargs: AttributeError (#30)
  • [REF] duplicate-id-csv: Better message of error - Message before: Duplicate id id_example1 in ir.model.access.csv file - Message now: security/ir.model.access.csv duplicated id id_example1
  • [REF] javascript-lint: Ignore /lib/ subfolder
  • [ADD] invalid-commit: Add new check invalid-commit - Verify the guideline https://github.com/oca/maintainer-tools/blob/master/CONTRIBUTING.md#never-commit-the-transaction

1.2.0

  • [REF] README.rst: Updating new checks
  • [IMP] test: Add tox for multi-environment and add compatiblity with latest version
  • [ADD] translation-required: Add check to required even a translation (#23)
  • [IMP] Add pylint check missing newline in extra extension files
  • [IMP] test: Add tox for multi-environment and add compatiblity with latest version
  • [IMP] Add Check tabs identation instead of four spaces
  • better_msg
  • merge
  • [REF] test: better way to identify check error expected
  • [IMP] Add check Duplicate field in xml record (#20)
  • [IMP] Add pylint check Redundant module name reference in xml_id
  • [IMP] pylint_odoo: Add check duplicate ids in ir.model.access.csv files
  • [IMP] pylint_odoo: Add check for manifest-version-format
  • [FIX] OCA/MQT#302: Use of astroid version 1.3.8

1.1.0

  • [FIX] setup: Build ChangeLog file
  • [ADD] Add check 'deprecated-openerp-xml-node'
  • [ADD] ChangeLog: Empty file to support auto build
  • [FIX] Change _fields by _columns
  • [REF] Fix typo
  • [IMP] Add check 'create-user-without-reset-password'
  • [IMP] Support odoo tag in xml file
  • [REF] Support of 'noupdate' in check 'duplicate-xml-record-id'
  • [REF] setup.cfg: Enable ChangeLog
  • [REF] README: Add new message manifest-author-string

1.0.2

  • check that author is a string

1.0.1

  • [REF] Migrate md to rst

1.0.0

  • [IMP] .travis.yml: Enable auto deploy of pypi package from travis
  • [ADD] pylint_odoo: Add main package
  • [ADD] .gitignore: Add file gitignore for first commit

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylint_odoo-10.0.9.tar.gz (74.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylint_odoo-10.0.9-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file pylint_odoo-10.0.9.tar.gz.

File metadata

  • Download URL: pylint_odoo-10.0.9.tar.gz
  • Upload date:
  • Size: 74.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for pylint_odoo-10.0.9.tar.gz
Algorithm Hash digest
SHA256 7ac4e28313bc3a9d5bef016e64daadf33a16de8a2521ca8ecdb9bf65b09845d1
MD5 822285ef826b6caa17a9dd058d8de3cb
BLAKE2b-256 879aba6b8e61ef9848b934e26004c28285d7d5ffd55b4eb6f847fec1bdcf4f24

See more details on using hashes here.

File details

Details for the file pylint_odoo-10.0.9-py3-none-any.whl.

File metadata

  • Download URL: pylint_odoo-10.0.9-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for pylint_odoo-10.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 372f47b4c720c3c9468396b9eb7d851644b2f0e882d24bbd7cc16c27453accbc
MD5 dd31a3de95d358de83393b540d61502e
BLAKE2b-256 a0fe3fcd6f034040a485ba1119b57d9d3d01259718c2dfd3c168fe944577100c

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page