odoo-lint

io.github.bosdv0.1.0-alpha.5Updated Oct 8, 2026

Lint and fix Odoo addons: pylint-odoo and OCA checks, translation files and upgrades.

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

Lets an assistant lint and auto-fix Odoo addon code, manifests, XML data files and translation files through a local MCP server.

What it does
Exposes the odl linter to an AI coding agent so it can check Odoo modules for Python, manifest, XML and .po translation problems, using rules ported from pylint-odoo and OCA checks with the same codes, names and messages. It can list and explain rules, apply safe or unsafe automatic fixes, preview them as diffs, and report upgrade leftovers from older Odoo versions. Output can be produced for CI formats such as GitHub annotations, GitLab Code Quality, SARIF and JSON.
When to use it
Useful when an assistant edits or reviews Odoo addons and should catch lint, upgrade and translation issues as it works, or when you want the same checks as OCA's pre-commit hook without running pylint. It is aimed at Odoo module development rather than general Python projects.
Requirements
Runs locally as a stdio process, started with uvx from the PyPI package odoo-linter (also installable with pip, pipx or cargo). Desktop only; no authentication, environment variables or headers are declared. Rules and company-specific author settings are configured in the project's pyproject.toml.
Before you install
The fix commands can modify files in the addon directory, including unsafe fixes, so review diffs before applying them and keep the work under version control. No credentials or network access are declared.

Installation

In SourceWeft

  1. Open odoo-lint in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[odoo-lint logo]

odoo-lint

[PyPI] [crates.io] [Tests] [OCA parity] [Documentation] [License: MIT]

Blazing fast Rust-native linter for Odoo modules. The command is called odl.

It checks Python files, manifests, XML data files and translation (.po) files, with the checks of OCA's pylint-odoo, oca-checks-odoo-module and oca-checks-po: same names, same messages, same results on their own test suites.

[Bar chart: linting OCA/sale-workflow takes 0.10s with odoo-lint and 25.8s with pylint-odoo]

Linting all of OCA/sale-workflow 18.0, as OCA's pre-commit hook runs pylint-odoo. See benchmarks.

  • ⚡ 250x faster than pylint with pylint-odoo, and still 30x faster on a single core
  • ⚖️ Drop-in for pylint-odoo and OCA's pre-commit checks: same codes, names and messages, 95/95 checks matching on their own test suites (Python, manifests, XML, .po), and # pylint: disable= comments keep working
  • 🔧 Automatic fixes, safe and unsafe as in Ruff, for Python, manifests, XML and .po files (odl check --fix, --diff to preview)
  • ⬆️ Upgrade checks: leftovers of older Odoo versions, such as Bootstrap 4 classes that do nothing since Odoo 15.0, with fixes
  • 🌍 Translation checks that predict Odoo's loader: why Odoo logs "malformed po file", and why a translation does not show up
  • 📦 Installable with pip, uv or pipx: one binary in prebuilt wheels for Linux, macOS and Windows, without Python dependencies
  • 🛠️ Configured in pyproject.toml, including company-specific author rules
  • 📋 Output for CI: GitHub annotations, GitLab Code Quality, SARIF and JSON
  • 🤖 For AI coding agents: an MCP server, and plugins for Claude Code, DeepSeek Harness and OpenCode that lint every file the agent edits
  • 🪝 Git hooks: pre-commit and hk

Installation

bash
uv tool install odoo-linter   # or: pipx install odoo-lintercargo install odoo-lint       # from crates.io

The PyPI package is called odoo-linter, because odoo-lint is too similar to an existing PyPI project. On crates.io it is odoo-lint.

Quick start

bash
odl check path/to/addons   # lint a directoryodl rule                   # list all rulesodl rule C8101             # explain a ruleodl check --fix            # apply the safe fixes (--diff to preview)

Rules ported from pylint-odoo keep its codes, names and messages, and # pylint: disable= comments keep working. Company-specific rules are configured in your pyproject.toml:

toml
[tool.odoo-lint]target-version = "17.0"
[tool.odoo-lint.rules.manifest-required-author.mapping]"acme_*" = "Acme Corp"

For AI coding agents there is an MCP server (odl mcp) and a post-edit hook, packaged as plugins for Claude Code (/plugin marketplace add bosd/odoo-lint), DeepSeek Harness and OpenCode.

See the documentation for all commands, configuration options and rules.

Development

bash
uv sync --all-groups   # builds odl into .venv via maturinuv run nox             # pre-commit, fmt, clippy, cargo tests, CLI tests, docs

See the development guide.

License

MIT

Source: README.md at commit 8469e21

Tools

0
Tool metadata has not been indexed yet.

Version history

1
  1. v0.1.0-alpha.5LatestOct 8, 2026