Skip to main content

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

odoo-pre-commit-hooks

OCA's custom pre-commit hooks for Odoo modules

Installation

You don't need to install it directly only configure your ".pre-commit-config.yaml" file

You even can install it directly:

  • Installing from pypi:

    • pip install -U oca-odoo-pre-commit-hooks
  • Installing from github:

    • pip install --force-reinstall -U git+https://github.com/OCA/odoo-pre-commit-hooks.git@main

Usage pre-commit-config.yaml

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

    - repo: https://github.com/OCA/odoo-pre-commit-hooks
        rev: v0.2.29
        hooks:
        - id: oca-checks-odoo-module
        - id: oca-checks-po
          args: ["--fix"]

Usage directly the entry points

If you install directly the package use the entry point:

oca-checks-odoo-module --help
oca-checks-po --help

Skip one xml-check for only one file

If you need to skip one check in one particular XML file you can use the follow comment

<?xml version="1.0" encoding="utf-8"?>
<!-- oca-hooks:disable=xml-check-to-skip -->
<odoo>
...
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<!-- oca-hooks:disable=xml-check-to-skip,
                       xml-check-to-skip2 -->
<odoo>
...
</odoo>

The position of the comment it is not relative to the line that throw the check

It disable the entire file

Configuration

Behavior can be configured through several methods and as of now only consists of enabling/disabling checks.

Enabling or Disabling Checks

Each available hook consists of multiple checks which can be enabled/disabled using any of the following methods (ordered by priority):

  1. As an argument e.g., oca-checks-odoo --enable=check-to-enable --disable=check-to-disable1,check-to-disable2
  2. Using environment variables OCA_HOOKS_ENABLE or OCA_HOOKS_DISABLE e.g., export OCA_HOOKS_ENABLE=check1,check2
  3. A configuration file. The path to it can be specified with the argument --config. Alternatively a file named .oca_hooks.cfg will be looked for (by default) in the following locations (in order):
    1. Current working directory
    2. Repo's root
    3. User's home

Using a Configuration File

To enable or disable checks using a configuration file, add a disable or enable key under the MESSAGES_CONTROL section. For example:

[MESSAGES_CONTROL]
enable=check-enable1,check-enable2
disable=check-to-disable

To customize the xml-tag-position check, you can also define xml_attributes_order in the same section. Each group declares equivalent attributes, and groups are enforced from left to right.

[MESSAGES_CONTROL]
xml_attributes_order=[t-if, t-else, t-elif], [id, t-att-id, t-attf-id], [class, t-att-class, t-attf-class]

Custom example:

[MESSAGES_CONTROL]
xml_attributes_order=[class], [id], [t-if]

The same value can also be passed from CLI with --xml-attributes-order.

As stated before, each source has a certain priority. This means that if the environment variable OCA_HOOKS_ENABLE=check1 exists, the configuration file above would not have any effect when it comes to enabling checks, and the only enabled check will be check1.

However, if OCA_HOOKS_DISABLE is not set, the configuration file will still have an effect and check-to-disable will be disabled.

Checks

  • Check weblate-component-too-long Check if the component is too long Weblate have 100 characters limit for repository name + Odoo Version + module name e.g. The following module: https://github.com/OCA/account-financial-reporting/tree/18.0/account_tax_balance Generates the following component: account-financial-reporting-18.0-account_tax_balance

  • Check file-not-used Check if there is a file created but not referenced from manifest.py

  • Check manifest-syntax-error Check if the manifest file has syntax error

  • Check prefer-readme-rst Check if the module has README.md file to prefer README.rst file

  • Check use-header-comments Check if the py file has comments '# comment' only in the header of python files Except valid comments e.g. pylint, flake8, shebang or comments in the middle (not header)

  • Check csv-duplicate-record-id duplicate CSV "id" AKA xmlid but for CSV files

  • Check csv-syntax-error Check syntax error for CSV files declared in the manifest

  • Check scss-css-import

An @import of a stylesheet that is not part of the bundle: @import url(...), an @import of an http(s):// or // address, or of a .css file. (Any other @import is a Sass partial that the compiler inlines, it costs nothing and is not reported.)

@import url(...) (and any @import inside a .css file) is left to the browser. The browser does not know about the imported file until it has downloaded and parsed the one that imports it, so the two downloads are chained one after the other instead of running in parallel, and the page cannot paint before both end (GTmetrix: "Avoid CSS @import" and "Avoid chaining critical requests"). When the address is another site, as fonts.googleapis.com, it also costs a new connection (DNS, TCP and TLS), the stylesheet has a short cache lifetime that you do not control, and every visitor is revealed to a third party. Self-host instead: download the font files as .woff2, declare the @font-face in the module with font-display: swap and delete the @import.

A quoted @import "..." of a .css file or of an address, in a .scss file, never reaches the browser: Odoo removes the quoted imports whose path has a dot or starts with ., / or ~, and reports "Local import is forbidden for security reasons" among the errors of the bundle. The file is not loaded at all. List it in the assets of the manifest instead (.css files go in the bundle as they are), or self-host the font as said above.

  • Check scss-font-display-missing

A @font-face without font-display. The browser then uses auto, which in practice is block: the text that uses the font stays invisible until the font arrives, up to 3 seconds, before it falls back (the "flash of invisible text"). That delays the First and Largest Contentful Paint of every page that has text in that font (GTmetrix: "Ensure text remains visible during webfont load").

font-display: swap paints the text at once with the fallback font and swaps it when the font is ready. Prefer optional for a decorative font that may be skipped on a slow connection, because it never moves the text (no layout shift). An icon font needs block: while it downloads the browser must wait for it, because a fallback font paints the code points of the icons as unrelated characters.

The stylesheets of the PDF report bundles are not reported: wkhtmltopdf does not paint the text progressively, so font-display has no effect there.

The autofix adds font-display: swap; as the last declaration of the @font-face.

  • Check scss-font-legacy-format

A @font-face serves its font as .otf, .ttf, .eot or .woff and no .woff2. WOFF2 compresses the font with Brotli: the same font weighs about 50-70 % less than the .ttf/.otf (an uncompressed container made for the desktop) and about 20-30 % less than .woff (zlib). Every browser still supported reads it (Chrome 36, Firefox 39, Safari 12, Edge 14), so no other format is needed as a fallback in a browser (wkhtmltopdf does not read WOFF2, so the stylesheets of the report bundles are skipped). With the default font-display the text stays invisible while the font downloads, so its size shows in the First and Largest Contentful Paint (GTmetrix: "Enormous network payloads").

To migrate a font keep its glyphs and convert only the container: pip install fonttools brotli && fonttools ttLib.woff2 compress Font.otf (or woff2_compress Font.otf), commit the new .woff2, point the url() to it with format("woff2") and delete the old file. Convert .eot and .svg fonts from the original .ttf/.otf.

Only the stylesheets that the manifest lists in assets are read: a Sass partial that is only reached through an @import, a .sass or .less file is not. The stylesheets of the PDF report bundles are not reported (the bundle is read from the assets of the manifest: web.report_assets_common, web.report_assets_pdf, snailmail.report_assets_snailmail...). wkhtmltopdf renders them with an old QtWebKit that cannot read WOFF2, so their fonts must stay as .ttf or .otf.

The autofix rewrites the url() and its format() when the .woff2 is already next to the old file. It does not convert the font: the conversion is a binary file that has to be reviewed and committed.

  • Check xml-deprecated-data-node Deprecated node inside xml node

  • Check xml-deprecated-oe-chatter

Odoo 18 introduced a new XML tag <chatter/> which replaces the old way to declare chatters on form views. For more information, see: https://github.com/odoo/odoo/pull/156463

Odoo 19 removed the field category_id of res.groups. It was replaced by privilege_id, a many2one to the new model res.groups.privilege, so a record still writing category_id breaks the installation with ValueError: Invalid field 'category_id' on model 'res.groups'. The autofix removes the field, the very change Odoo applied to its own groups whose category was only a technical one. Set privilege_id by hand instead when the group is meant to be displayed under a privilege in the user form. For more details https://github.com/odoo/odoo/commit/33637d137ed52f5faabaafd5c208e187042be8eb and https://github.com/odoo/odoo/pull/199988

  • Check xml-header-missing Generated when the XML file is missing the XML declaration header ''

  • Check xml-header-wrong Generated when the XML file declaration header is different than expected (case sensitive).

  • Check xml-img-without-size

The <img> tag of a QWeb template has no width and height attributes. The browser reserves no space for the picture until it arrives, so everything below it moves when it does (Cumulative Layout Shift, reported by Lighthouse and GTmetrix as "Use explicit width and height on image elements"). Use the intrinsic size of the image in pixels: with img-fluid or height: auto the picture still scales down with its container, but the width attribute is the width that it uses, so a smaller number than the real one shrinks the picture. The dynamic forms t-att-width, t-attf-width, t-att and t-att-style, a width and a height in the inline style and an inline aspect-ratio are accepted too. Images of a t-field or t-out widget, whose tag is built by Odoo, and the QWeb views declared in the arch of an ir.ui.view record are not seen here.

The picture is not reported where stating its size is useless or harmful:

  • a PDF report or a mail: the template inherits or calls a report or mail layout (web.external_layout*, web.html_container, mail.*, mass_mailing.*), it is the template of an ir.actions.report of the module, or its file is in a report/ directory or has mail, mailing or digest in its name

  • content that the user replaces in the website builder: a picture with a fixed src inside a data-snippet, an oe_structure/o_editable zone, a snippet template (s_*) or a page template. A picture whose src is built by the template (t-att-src, t-attf-src: the logo of the website, the photo of a record) is still reported

  • a size already fixed by the class (o_image_64_cover) or by width and height in the inline style, a picture out of the flow (position-absolute, position: absolute) and a pixel inside <noscript> Anything else can be silenced with the usual comment of the file.

  • Check xml-not-valid-char-link The resource in in src/href contains a not valid character.

  • Check xml-oe-structure-missing-id

Ensure all tags with class 'oe_structure' have an ID. For more information on the rationale, see: https://github.com/OCA/odoo-pre-commit-hooks/issues/27

  • Check xml-redundant-module-name

If the module is called "module_a" and the xmlid is <record id="module_a.xmlid_name1" ...

The "module_a." is redundant it could be replaced to only <record id="xmlid_name1" ...

  • Check xml-field-bool-without-eval

if the record is boolean but without eval attribute <field name="active">True</field> instead of <field name="active" eval="True" />

  • Check xml-field-numeric-without-eval

if the record is integer but without eval attribute <field name="sequence">100</field> instead of <field name="sequence" eval="100" />

  • Check xml-invisible-in-list-view

Using invisible="1" or invisible="True" on a <field> inside a <list> or <tree> view does not hide the column properly. Since Odoo 17 the correct attribute to hide an entire column is column_invisible="True". For more details see https://www.odoo.com/documentation/17.0/developer/reference/backend/views.html#lists

Only the columns, the fields that are direct children of the <list> or <tree>, are checked, so the ones added by an inherited view (<xpath ... position="inside">, <attribute name="invisible">) are not reported. A field of a view declared inside a field of the list (<form>, <kanban>, ...) or of a <groupby> is not reported either.

The autofix replaces invisible="1" and invisible="True" with column_invisible="True". The column is then removed as a whole: its header, its footer total and its export are gone too, instead of only emptying the cell of each row. It is skipped (the error is still reported) when the field already has column_invisible.

  • Check xml-create-user-wo-reset-password records of user without context="{'no_reset_password': True}" This context avoid send email and mail log warning

  • Check xml-view-dangerous-replace-low-priority in ir.ui.view

    ...
  • Check xml-deprecated-tree-attribute The tree-view declaration is using a deprecated attribute.

  • Check xml-record-missing-id Generated when a tag has no id.

  • Check xml-duplicate-record-id

If a module has duplicated record_id AKA xml_ids file1.xml <record id="xmlid_name1" file2.xml <record id="xmlid_name1"

  • Check xml-duplicate-fields in all record nodes <record id="xmlid_name1"... <field name="field_name1"... <field name="field_name1"...

  • Check xml-syntax-error Check syntax of XML files declared in the Odoo manifest

  • Check xml-tag-position Check the position of XML attributes. The order is dynamically configurable via xml_attributes_order.

  • Check xml-dangerous-qweb-replace-low-priority Dangerous qweb view defined with low priority

  • Check xml-duplicate-template-id Triggered when two templates share the same ID

  • Check xml-xpath-translatable-item check xpath nodes using contains(text(), 'Text translatable') Since that the text could be translated so it is a mutable value. It could raise ValueError exception if the language is changed.

** Special fixit checks

  • Check field-string-redundant Detects and removes the 'string' parameter in odoo.fields if it is redundant (matches the field name in Title Case), ensuring it only applies to Odoo Class definitions (Models).

  • Check manifest-superfluous-key Identifies and removes Identifies from Odoo manifest files (manifest.py) superfluous keys (if they have the same as the default value) should be omitted for simplicity

e.g. 'installable': True True is the default value for installable key

e.g. 'data': [] [] is the default value for 'data' key

  • Check prefer-env-translation Replace _('text') with self.env._('text') only if '' comes from 'odoo.' and only for modules >=18.0

  • Check unused-logger Disallow unused _logger = logging.getLogger(__name__) in Odoo models.

Checks PO

  • Check po-requires-module Translation entry requires comment #. module: MODULE

  • Check po-python-parse-printf Check if msgid is using str variables like %s So translation msgstr must be the same number of variables too

  • Check po-python-parse-format Check if msgid is using str variables like {} So translation msgstr must be the same number of variables too

  • Check po-duplicate-message-definition (message-id) in all entries of PO files

  • Check po-duplicate-model-definition Verify that no entries share the same 'model:' tag

  • Check po-pretty-format Check the following:

  1. Entries sorted alphabetically
  2. Lines are wrapped at 78 columns (same as Odoo)
  3. Clear msgstr when it is the same as msgid
  • Check po-syntax-error Check syntax of PO files from i18n* folders

Help

usage: oca-checks-odoo-module [-h] [--no-verbose] [--no-exit] [--disable DISABLE] [--enable ENABLE] [--config CONFIG] [--list-msgs] [--fix] [--xml-attributes-order XML_ATTRIBUTES_ORDER] [files_or_modules ...]

positional arguments:
 files_or_modules Odoo __manifest__.py paths or Odoo module paths.

options:
 -h, --help show this help message and exit
 --no-verbose If enabled so disable verbose mode.
 --no-exit If enabled so it will not call exit.
 --disable, -d DISABLE Disable the checker with the given 'check-name', separated by commas.
 --enable, -e ENABLE Enable the checker with the given 'check-name', separated by commas. Default: All checks are enabled by default
 --config, -c CONFIG Path to a configuration file (default: .oca_hooks.cfg)
 --list-msgs List all currently enabled messages.
 --fix Automatically fix files when possible
 --xml-attributes-order XML_ATTRIBUTES_ORDER Define a group of XML attributes to order with priority, comma-separated values. Repeat this option to add multiple groups. Example: --xml-attributes-order=t-if,t-else --xml-attributes-order=id,t-att-id --xml-attributes-order=class

Help PO

usage: oca-checks-po [-h] [--no-verbose] [--no-exit] [--disable DISABLE] [--enable ENABLE] [--config CONFIG] [--list-msgs] [--fix] [--xml-attributes-order XML_ATTRIBUTES_ORDER] [po_files ...]

positional arguments:
 po_files PO files.

options:
 -h, --help show this help message and exit
 --no-verbose If enabled so disable verbose mode.
 --no-exit If enabled so it will not call exit.
 --disable, -d DISABLE Disable the checker with the given 'check-name', separated by commas.
 --enable, -e ENABLE Enable the checker with the given 'check-name', separated by commas. Default: All checks are enabled by default
 --config, -c CONFIG Path to a configuration file (default: .oca_hooks.cfg)
 --list-msgs List all currently enabled messages.
 --fix Automatically fix files when possible
 --xml-attributes-order XML_ATTRIBUTES_ORDER Define a group of XML attributes to order with priority, comma-separated values. Repeat this option to add multiple groups. Example: --xml-attributes-order=t-if,t-else --xml-attributes-order=id,t-att-id --xml-attributes-order=class

Examples

Examples PO

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

v0.2.29

  • [ADD] checks_odoo_module_scss: new scss-css-import check
  • [ADD] checks_odoo_module_scss: new scss-font-display-missing check with autofix
  • [ADD] checks_odoo_module_scss: new scss-font-legacy-format check with autofix (#205)
  • [ADD] checks_odoo_module_xml: new xml-img-without-size check (#204)

v0.2.28

  • [ADD] checks_odoo_module_xml: new xml-invisible-in-list-view check with autofix for v17+ (#203)

v0.2.27

  • [ADD] xml-deprecated-res-groups-category-id: New check with autofix for v19.0+ (#200)

v0.2.26

  • [REM] xml-template-prettier-incompatible: Remove check

v0.2.25

  • [FIX] coveragerc: force core=ctrace for dynamic contexts on Python 3.14+
  • [IMP] utils: avoid git subprocess and cache top_path/walk_up results
  • [IMP] fixit: Disable nested parallelism under pre-commit to run ~5x faster
  • [IMP] ci: add Python 3.15-dev and refresh tooling (#195)

v0.2.24

  • [ADD] xml-tag-position: enforce id, t-if/t-else/t-elif and class positioning attribute rules (#190)

v0.2.23

  • [REF] .coveragerc: Reduce to 90% the fail-coverage
  • [REM] xml-double-quotes-py: Remove check since that it left "

v0.2.22

  • [FIX] xml-double-quotes-py: fix tag detection and report exact attribute line (#188)

v0.2.21

  • [FIX] checks_odoo_module_xml: return bytes from _get_first_tag
  • [FIX] test: Fix tmp dir for win
  • fix xml-double-quotes-py
  • [FIX] xml-id-position-first: preserve XML formatting during attr reordering
  • [FIX] xml-deprecated-qweb-directive-15: preserve XML formatting during autofix
  • [REF] tests: Add new corner case

v0.2.20

  • [REF] pre-commit-hooks: Use better description of the hook (#180)

v0.2.19

  • [REF] test: Add test for xml-deprecated-qweb-directive-15 check (#179)
  • [IMP] checks_odoo_module_xml: Add NodeContent class and improve the comment lines (#176)
  • [ADD] xml-double-quotes-py: Detect XML attributes containing escaped double quotes " -> (") (#178)

v0.2.18

  • [REF] coveragerc: Relax 'fail under' parameter since that coveralls cover all the tests together insteaad of individual
  • [ADD] weblate-component-too-long: Check if the weblate component name is too long

v0.2.17

  • [ADD] xml-deprecated-qweb-directive-15: t-esc and t-raw directives are deprecated in Odoo v15.0, use t-out instead (#174)

v0.2.16

  • [REF] field-string-redundant: Skip related fields in the check (#173)

v0.2.15

  • [ADD] field-string-redundant: Add old pylint known check but with autofix (#172)
  • [REF] tox, github: Enable tox env 'multi' to run multiple jobs (#171)

v0.2.14

  • [REF] test_profiling: Enable profiling from pytest
  • [REF] checks_odoo_module_fixit: Use pathlib instead of os.path
  • [FIX] fixit: Use the correct disable comment (#168)
  • [REF] tests: Migrating unittest to pytest (#167)
  • [REF] prefer-env-translation: Consider static method case (#165)
  • [REF] prefer-env-translation: Consider new test cases (#164)

v0.2.13

  • [REF] checks_odoo_module_fixit: Use a separated entrypoint to be called from pre_commit with parallels (#163)
  • [IMP] prefer-env-translation: Now supports multiple calls in the same line (#162)

v0.2.12

  • [FIX] prefer-env-translation: Skip check if it is not Odoo's class (#161)

v0.2.11

  • [FIX] use-header-comments: Remove extra newline (#160)
  • [REF] readme: Use whole original message (#159)

v0.2.10

  • [REF] use-header-comments: Skip fully commented files to avoid deletion (#158)

v0.2.9

  • [ADD] use-header-comments: New check to remove comments in the py headers (#157)
  • [REF] fixit: If the environment variable FIXIT_ODOO_VERSION is defined so it is used (#154)
  • [REF] checks_odoo_module_xml: Use filename_short instead of full path (#156)

v0.2.8

  • [REF] requirements: Use fixit from pypi after recent release (#155)

v0.2.7

  • [ADD] unused-logger: Add new check for unused _logger with autofix (#153)

v0.2.6

  • [ADD] xml-template-prettier-incompatible: Add new check for xml template node incompatible with prettier autofixes (#150)
  • [REF] github-actions: Enable py3.14 stable and use to build, lint and update-readme (#152)
  • [IMP] xml-id-position-first: Consider 'template' tag (#151)

v0.2.5

  • [ADD] xml-field-bool-without-eval, xml-field-numeric-without-eval: Check for bool or numeric fields without eval in xml records (#147)

v0.2.4

  • [FIX] file-not-used: Skip check for non-installable modules
  • [ADD] prefer-readme-rst: Add new check to prefer README.rst over README.md

v0.2.3

  • [REF] github: The macOS-13 based runner images are now retired. (#146)
  • [REF] checks_odoo_module_xml: Support auto-fixing multiline attributes (#145)

v0.2.2

  • [REF] manifest-superfluous-key: Consider boolean keys are `False` by default (#144)
  • [REF] checks_odoo_module_xml: Add the tag to be replace at fine grane (#143)

v0.2.1

  • [REF] xml-redundant-module-name: Add autofix
  • [ADD] xml-id-position-first: Add check to detect when xml id is not the first attribute

v0.2.0

  • [ADD] prefer-env-translation, manifest-superfluous-key: Add new checks with autofix using fixit library (#141)

v0.1.8

  • [ADD] xml-header-missing, xml-header-wrong: Add new XML checks with autofix (#140)

v0.1.7

  • [REM] xml-dangerous-filter-wo-user: Remove outdated check for dangerous filters without user (#139)
  • [REF] *: Small fixes (#137)

v0.1.6

  • [REF] requirements.txt: Update polib (#134)

v0.1.5

  • [REF] global_parser: FileType is deprecated for py3.14
  • [REF] github-actions: Use py3.14-dev
  • [REF] github-actions: Add codecov token to fix upload coverage (#131)

v0.1.4

  • [REF] file-not-used: Skip option using "oca_data_manual" in the manifest file (#130)

v0.1.3

  • [FIX] requirements.txt: Add missing 'packaging' requirement (#129)

v0.1.2

  • [ADD] file-not-used: Detects files not used from manifest (#127)
  • [FIX] utils: Fix "TypeError: expected string or bytes-like object, got 'NoneType'" (#128)
  • [ADD] xml-deprecated-oe-chatter: Check for deprecated chatter for odoo v18.0+ (#125)

v0.1.1

  • [REF] po-duplicate-message-definition: Ignore i18n_extra folder (#123)

v0.1.0

  • [REF] checks_odoo_module_po: Remove special char incompatible with windows codecs (#117)
  • [REF] README: Update readme with new py3.13 version
  • [REF] setup.py: Deprecate py3.8-

v0.0.35

  • [FIX] po-pretty-format: Allow original=translated term for "i18n_extra" folder (#113)

v0.0.34

  • [IMP] *: Display the duplicated lines (#111)
  • [REF] tox.ini: Add compatibility with new pyttest (#112)
  • [IMP] csv-duplicate-record-id: show the actual record id
  • [IMP] xml-duplicate-record-id: show the actual record id

v0.0.33

  • [IMP] check_odoo_module_po: extract line number from error message (#108)
  • [IMP] Better error output (#106)

v0.0.32

v0.0.31

  • [REF] setup: Add py3.12 support info (#98)
  • [REF] .github: Update actions version, fix cache and update lints (#97)
  • [REF] tests: Fixing windows po autofix unitest (#96)

v0.0.30

  • CI improvements (#93)
  • [REF] setup: Enable py311 classifier (#87)

v0.0.29

  • IMP] add xml-duplicate-template-id message (#82)
  • [FIX] lints (#86)
  • [ADD] po-duplicate-model-definition check (#85)
  • [REF] Don't filter out messages, move is_message_enabled (#83)
  • [IMP] add xml-record-missing-id (#84)

v0.0.28

  • [FIX] oe-structure-missing-id: change constraints, add docs (#81)

v0.0.27

  • [REF] improve xpath expressions (#80)

v0.0.26

  • [IMP] Improve XPath expressions, compile them only once, fix false negative, add profiling tests (#79)
  • [ADD] pretty-format-po check (#76)
  • [IMP] add xml-oe-structure-missing-id check (#78)
  • [REF] tests: Generate immutable readme (without extra spaces)
  • [IMP] README: Added a section on configuration

v0.0.25

  • [REF] requirements.txt: Update polib to fix issues and improves (#72)

v0.0.24

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

v0.0.23

  • [FIX] Correct documentation (#69)

v0.0.22

  • [IMP] Help msg for "xml-view-dangerous-replace-low-priority" (#68)
  • Wrote documentation for proposed refactoring (#66)
  • [FIX] ci: update flake8 repo URL, tox.ini and gh actions .yml (#65)
  • [REF] hooks: Add support for `` (#62)

v0.0.21

  • [REF] duplicate-xml-fields: Only applies to direct record's children (#58)

v0.0.20

  • [FIX] xml-xpath-translatable-item: Fix false negative calling a method o.amount_to_text() (#57)

v0.0.19

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

v0.0.18

  • [FIX] checks_odoo_module: Support glob expression for "qweb" manifest data section (#54)
  • [IMP] oca_pre_commit_hooks: Add --list-msgs option (#53)
  • [REF] oca_pre_commit_hooks: Silent subprocess git error (#52)

v0.0.17

  • [IMP] oca_pre_commit_hooks: Support enable/disable from ENV (#38) (#49)

v0.0.16

  • [ADD] xml-xpath-translatable-item: Add new check to identify mutable item used from xpath (#50)

v0.0.15

  • [FIX] oca_pre_commit_hooks: Fix exit_status false error (#48)

v0.0.14

  • [IMP] oca_pre_commit_hooks: Support for config file (#41)

v0.0.13

  • [REF] pylint_odoo: Remove TODO comments (#47)
  • [REF] requirements: Remove unused libraries and pre-commit hooks (#45)
  • [REF] xml-deprecated-data-node: Use the data node sourceline instead of odoo node (#43)
  • [IMP] oca_pre_commit_hooks: Support disable XML checks from disable comments (#42)
  • [REF] README: Fix name of pypi package (#35)
  • [REF] oca_pre_commit_hooks: cli_po, cli: Add cli_po and cli global (#36)
  • [REF] setup: Match requires-python = ">=3.7" from pre-commit
  • [REF] CI: Enable py3.11

v0.0.12

  • [REF] checks_odoo_module_xml: Allow duplicated fields with 'groups' (#32)
  • [REF] CI: Enable tox with parallels + codecov compatibility (#33)

v0.0.11

  • [REF] codecov: Enable codecov again
  • [REM] missing-readme: Check add to pylint-odoo
  • [REF] TOX: Strip names, remove no-cover, compatible with parallels option (#24)
  • [REF] lint: Adapt lints for py packages instead of odoo module (#23)

v0.0.10

  • [REF] README: Update README and fix mutable results auto-generating it (#22)
  • [REF] checks_odoo_module_po: Run on modified PO files only (#21)
  • [REF] manifest: Skip duplicated data files (#20)

v0.0.9

  • [FIX] README: Fix regex to replace autogenerated content (#18)
  • [REF] README: Detect from CI if README needs to be updated (#17)

v0.0.8

  • [REF] README: Add examples of checks section and script to auto-generate it (#16)
  • [REF] README: Add help section and script to auto-generate it (#15)

v0.0.7

  • [REF] checks: name_checks changed to name-checks (#14)
  • [REF] oca_pre_commit_hooks: Use shorter path in messages (#13)
  • [FIX] pre-commit-hooks.yaml: Run checks even if the manifest was not changed
  • [REF] test: Remove TODO comments already fixed

v0.0.6

  • [FIX] oca_pre_commit_hooks: Fix checks if it has syntax error (#8)

v0.0.5

  • [REF] oca_pre_commit_hooks: Small improvements (#7)

v0.0.4

  • [IMP] oca_pre_commit_hooks: Enable feature to 'enable' checks (#6)
  • [IMP] oca_pre_commit_hooks: Add entrypoint arguments to disable checks (#5)

v0.0.3

  • [REF] README: Remove deprecated CI build

v0.0.2

  • [REF] CI: Re-use tox to run pre-commit in the CI with same caches and packages
  • [ADD] .pre-commit-hooks.yaml: Compatible with pre-commit-hooks to use as hook id directly

v0.0.1

  • [ADD] Migrate pylint-odoo checks (not related to python) to pre-commit hooks (#2)
  • Initialize

Metadata

Release files for oca-odoo-pre-commit-hooks 0.2.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oca-odoo-pre-commit-hooks 0.2.29
File Size Uploaded Provenance Actions
oca_odoo_pre_commit_hooks-0.2.29.tar.gz 114.9 kB Without provenance Details for oca_odoo_pre_commit_hooks-0.2.29.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oca-odoo-pre-commit-hooks 0.2.29
File Interpreter ABI Platform Actions
oca_odoo_pre_commit_hooks-0.2.29-py3-none-any.whl Python 3 none any Details for oca_odoo_pre_commit_hooks-0.2.29-py3-none-any.whl

Total release size: 200.6 kB

Release files / oca_odoo_pre_commit_hooks-0.2.29.tar.gz

Download URL oca_odoo_pre_commit_hooks-0.2.29.tar.gz
Size 114.9 kB
Tags Source
SHA-256 checksum
How to use checksums
14e61f6cf536279bf54aee6538708ee09d879014c23fb669ea8feaa00d61ff6b
BLAKE2b-256 checksum
How to use checksums
17383b0ecdf9b2289e560b64e9036e4a7bdcb13a2a2bd32c64568499ea64ec31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / oca_odoo_pre_commit_hooks-0.2.29-py3-none-any.whl

Download URL oca_odoo_pre_commit_hooks-0.2.29-py3-none-any.whl
Size 85.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f236c5366a83f77cd38fe1a195a4508982a00070a6b99ccac0520c98eac6a14c
BLAKE2b-256 checksum
How to use checksums
d9613d72f218d000c492b11e751b010bb18e555092cfc483152095916407193c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for oca-odoo-pre-commit-hooks 0.2.29

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.29 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page