Skip to content

Releases: bosd/odoo-lint

odoo-lint 0.1.0-alpha.8

Pre-release

Choose a tag to compare

@bosd bosd released this 09 Oct 19:38
Immutable release. Only release title and notes can be modified.
76cf88b

New since 0.1.0a7:

  • odl readme (#51): builds a module's README.md and static/description/index.html from its readme/*.md fragments. The output is the same as the OBS client template's generator: the same comrak 0.54 engine and the same page, byte for byte except for documents with a Mermaid diagram. It does 86 modules in 0.06 s. --check writes nothing and exits 1 when something is out of date.
  • ODOO007 python-field-not-found (#52): field names and paths in Python that don't exist. It looks at @api.depends/onchange/constrains, related=, the inverse field of a One2many, field domains, _order/_rec_name and mapped(), and follows relational fields to their comodel. When another module of the addons path has the field, the message names it. On Odoo 18 core it found three real defects in Odoo itself.
  • Go to definition in odl server (#53): from an XML id, a model or a field to its definition, in XML and Python, including each part of a field path.
  • U1716 (#49): an onchange domain Odoo ignores is reported as dead code when the field has a domain of its own (in Python or a view), and as a regression naming the fields when it doesn't.
  • odl check --exit-zero (#56): reports findings but exits 0, for advisory hooks. The pre-commit mirror gets an odoo-lint-advisory hook with it.
  • A VS Code extension (#50, #54), published to Open VSX and the Visual Studio Marketplace.

odoo-lint 0.1.0-alpha.7

Pre-release

Choose a tag to compare

@bosd bosd released this 09 Oct 10:13
Immutable release. Only release title and notes can be modified.
127295a

New since 0.1.0a6: a model of the addons path. odl now knows the models, fields and XML ids of Odoo and all your addons, and checks references between modules before Odoo does at install.

  • ODOO004 view-field-not-found (#44): a field in a view that its model doesn't have, as the modules depends reaches define it. It follows embedded lists and forms to their comodel.
  • ODOO005 xml-id-not-found (#46): an XML id (ref=, inherit_id, menus, groups, t-call, %(...)d, ref(), CSV :id, env.ref()) that:
    • doesn't exist;
    • comes from a module outside depends;
    • or is loaded later than the record that uses it: in a later file, further down, or only in demo data.
  • ODOO006 model-not-found (#46): an _inherit parent, or the model of a record, view or action, that no module in depends defines.
  • Missing dependencies are named: when another module of the addons path has the field, id or model, the message names it.
  • Configuration:
    • addons-path in the config (globs such as ../oca/* work) or --addons-path.
    • A module whose dependencies can't all be found isn't checked, so these checks never guess.
    • All of Odoo 18 core takes 2 to 3 seconds.
  • Field string fix (#45): MOD009's fix no longer leaves fields.Char(,) when string was the only argument.

odoo-lint 0.1.0-alpha.6

Pre-release

Choose a tag to compare

@bosd bosd released this 08 Oct 20:10
Immutable release. Only release title and notes can be modified.
6f1be3c

New since 0.1.0a5:

  • Upgrade rules for every version step from 16.0 to 20.0: 93 rules with U codes (U16xx to U20xx), for what breaks or silently stops working on each version (#31, #35, #36, #39, #40).
    • About half have a fix. Examples: <tree> → <list>; attrs/states → Python expressions, with Odoo 16's own semantics; _sql_constraints → models.Constraint; groups_id → group_ids; t-esc → t-out; typed config parameters.
    • They were tested against code OCA and Odoo already migrated. For each step, the fixed old branch was compared with the real new one, and the rules were run on the new branch to catch false positives.
    • odl upgrade-check --target 19.0 reports, per module, what is automatic, what to review and what is left by hand.
  • upgrade-check counts a module's own version for the upgrade rules (#42). A module whose version was bumped to 19.0 before its code was migrated is no longer reported ready.
  • OCA's remaining module checks (#41): MOD001–MOD009. Unused data files, CSV syntax errors and duplicate ids, unloadable manifests, README.md, Weblate component length, unused _logger, redundant field string, and header comments (MOD008, opt-in). Parity with oca-checks-odoo-module is now 33/33.
  • Files that do not belong in a module (#41):
    • ODOO002 reports packages, archives, executables, database dumps and videos;
    • ODOO003 reports files over 1 MiB.
    • Both are configurable.
  • --config reads any pyproject, whatever its file name, and odl says when no config was found (#33).

odoo-lint 0.1.0-alpha.5

Pre-release

Choose a tag to compare

@bosd bosd released this 08 Oct 16:41
Immutable release. Only release title and notes can be modified.
cff52da

New since 0.1.0a4:

  • Fill in missing manifest keys from the configuration (#21): a manifest-defaults table per module pattern. C8102 and C8119 get a safe fix for a missing required key; C8101 fills in a missing author. Nothing is guessed: without a configured value there is no fix.
  • odl badge (#22): README badges for the share of clean modules and for readiness for an Odoo version.
  • Trial feedback from a client repository (#25):
    • C8101 never changes an existing author, not even with --unsafe-fixes.
    • W8163 no-search-all gets bounded-models for models with few records by design. It's empty by default, as in pylint-odoo.

odoo-lint 0.1.0-alpha.4

Pre-release

Choose a tag to compare

@bosd bosd released this 08 Oct 14:58
Immutable release. Only release title and notes can be modified.
cd1eafa

New since 0.1.0a3:

  • XML checks (#19): the XML data files a module's manifest loads are now linted.
    • XML001–XML024 reimplement the XML checks of OCA's oca-checks-odoo-module. All 717 findings on its test repository match by file, line and check.
    • XML101/XML102 report Bootstrap 4 classes in Odoo 15.0+ modules; XML101 renames them with a fix.
    • Version-gated checks follow each module's own manifest version.
  • odl upgrade-check --target X (#20): what modules need for a newer Odoo version, per version step, split into automatic, to review and by hand. Also available as the upgrade_check MCP tool.
  • Release workflow (#18): re-runs of the publish job work without manual cleanup.
uv tool install --prerelease allow odoo-linter   # or: pip install --pre odoo-linter

odoo-lint 0.1.0-alpha.3

Pre-release

Choose a tag to compare

@bosd bosd released this 08 Oct 13:35
Immutable release. Only release title and notes can be modified.
97dd4ab

The first alpha with the full pylint-odoo and oca-checks-po rule set, automatic fixes, and integrations for editors, AI agents and git hooks.

uv tool install --prerelease allow odoo-linter   # or: pip install --pre odoo-linter

Highlights

  • Drop-in for pylint-odoo and oca-checks-po:
  • 250x faster than pylint-odoo: linting OCA/sale-workflow takes 0.10 s instead of 25.8 s, and 0.77 s on a single core. (#12)
  • Translation checks that predict Odoo's loader (PO101–PO104): they catch translations Odoo silently drops, references it can't read ("malformed po file"), language files it never loads, and fuzzy entries. (#8)
  • Automatic fixes: odl check --fix, --unsafe-fixes and --diff, for Python, manifests and .po/.pot files. Examples:
    • self._cr → self.env.cr
    • _() → self.env._()
    • select= → index=
    • removing superfluous manifest keys
    • adding missing #. module: comments
    • pretty-formatting PO files the way OCA's check expects
    • adding missing msgids to the .pot (#9)
  • AI coding agents:
    • odl mcp is an MCP server with check, fix and rule tools.
    • odl hook lints each file right after the agent edits it.
    • Plugins for Claude Code (/plugin marketplace add bosd/odoo-lint), DeepSeek Harness and OpenCode. (#10)
  • Editors: odl server is a language server with diagnostics while you type, quick fixes and "fix all". A Zed extension is included, and the docs cover Neovim, Helix and OpenCode. (#13)
  • Git hooks:
  • CI output formats: GitHub annotations, SARIF (code scanning, reviewdog), GitLab Code Quality and JSON. (#3)

Notes

  • This is an alpha. The CLI, the config format and the rule set can still change before 0.1.0.

  • Configuration lives under [tool.odoo-lint] in pyproject.toml, or in odoo-lint.toml. See https://odoo-lint.readthedocs.io/en/latest/configuration.html.

  • 0.1.0-alpha.2 was tagged but never reached PyPI or crates.io (the release workflow failed on immutable releases); this release has the same content.

odoo-lint 0.1.0-alpha.2

Pre-release

Choose a tag to compare

@bosd bosd released this 08 Oct 13:22
Immutable release. Only release title and notes can be modified.
f99bf25

The first alpha with the full pylint-odoo and oca-checks-po rule set, automatic fixes, and integrations for editors, AI agents and git hooks.

uv tool install --prerelease allow odoo-linter   # or: pip install --pre odoo-linter

Highlights

  • Drop-in for pylint-odoo and oca-checks-po:
  • 250x faster than pylint-odoo: linting OCA/sale-workflow takes 0.10 s instead of 25.8 s, and 0.77 s on a single core. (#12)
  • Translation checks that predict Odoo's loader (PO101–PO104): they catch translations Odoo silently drops, references it can't read ("malformed po file"), language files it never loads, and fuzzy entries. (#8)
  • Automatic fixes: odl check --fix, --unsafe-fixes and --diff, for Python, manifests and .po/.pot files. Examples:
    • self._cr → self.env.cr
    • _() → self.env._()
    • select= → index=
    • removing superfluous manifest keys
    • adding missing #. module: comments
    • pretty-formatting PO files the way OCA's check expects
    • adding missing msgids to the .pot (#9)
  • AI coding agents:
    • odl mcp is an MCP server with check, fix and rule tools.
    • odl hook lints each file right after the agent edits it.
    • Plugins for Claude Code (/plugin marketplace add bosd/odoo-lint), DeepSeek Harness and OpenCode. (#10)
  • Editors: odl server is a language server with diagnostics while you type, quick fixes and "fix all". A Zed extension is included, and the docs cover Neovim, Helix and OpenCode. (#13)
  • Git hooks:
  • CI output formats: GitHub annotations, SARIF (code scanning, reviewdog), GitLab Code Quality and JSON. (#3)

Notes