Repository navigation
Releases
Releases · GetFluvo/odoo-lint
v0.1.0-alpha.21
Immutable
release. Only release title and notes can be modified.
Changes
- The repository moved to GetFluvo/odoo-lint, with odoo-lint-pre-commit and odoo-lint-action. Old
bosd/...URLs redirect; update pre-commitrepo:and Actionuses:lines when convenient. - The MCP server is now
io.github.GetFluvo/odoo-lintin the MCP Registry. - The Zed extension downloads its binaries from GetFluvo/odoo-lint.
No linter changes since 0.1.0-alpha.20.
v0.1.0-alpha.20
Immutable
release. Only release title and notes can be modified.
New
odl check --show-fixes: with--fixor--diff, lists the fixes per file and rule, the most frequent first. (#152)
Changed
- PO106 without the module's dependencies on the addons path reports only terms of its code and data files that the template lacks (a new
_()message or view label), and offers no fix: the labels of its models may then be wrong, which made every template look outdated. With the dependencies it reports and fixes as before. (#150)
v0.1.0-alpha.19
Immutable
release. Only release title and notes can be modified.
New
- PO106
pot-outdated(opt-in): reports a module'si18n/<module>.potthat differs from whatodl potwrites from its source, with how many terms it lacks and how many the source no longer exports. The fix writes the template; it is unsafe when dependencies are missing from the addons path.odl pot --checkas a rule, for the editor andodl check. (#147)
v0.1.0-alpha.18
Immutable
release. Only release title and notes can be modified.
New
odl potwrites a module's.pottemplate without running Odoo: the terms of its Python code, models (labels, help, selections, constraints) and the records its data files create, at 99% parity with OCA's templates on 19.0.--mergeupdates the module's.pofiles from it. (#118, #120, #133, #140)noqacomments in XML and.pofiles:<!-- noqa: XML004 -->and# noqa: PO003. (#138)odl check --statisticscounts the findings per rule, the most frequent first;[*]marks the rules--fixfixes. (#145)- Colours on a terminal: the path in bold, the code in red.
NO_COLORturns them off; piped output is unchanged. (#145) odl rule W83lists the rules of a code prefix,odl rule 8101those of a number. (#144)
Changed
- No banner or "No config found" notice by default;
-v/--verboseprints the Odoo version source and config,-q/--quietonly the findings. (#128) - An unknown
--select/--ignoreselector, or a configselectthat matches no rule, exits 2 instead of linting nothing. (#128) - A path that does not exist exits 2; a file odoo-lint does not lint (a
README.md) is skipped. (#121) - With an addons path,
odl checkwarns about a folder that does not exist, one a level too high (the Odoo checkout instead of itsaddons), and dependencies it cannot find. (#128, #136)
Fixes
From a review of the whole code base. (#121–#126)
- C8116 no longer removes
"installable": False(regression in alpha.17). - W8161's fix no longer rewrites
_()in parameter defaults and decorators, where there is noself; its quick fix keeps the import while other calls use it. - XML023/XML024 fixes no longer corrupt a
<field>tag over several lines; XML002 handles a BOM or CRLF. odl formatkeeps whitespace that is alone in an element, and formats stylesheets again.- PO007 wraps Thai, Devanagari and Arabic as polib does; PO metadata sorts as polib does; PO005 puts merged references one per line (#117).
excludeandper-file-ignoreswork from a subdirectory and with a relative--config;ignore = ["ALL"]turns opt-in rules off too;# noqaafter a string over several lines covers the line it starts on.odl serversurvives a malformed request and finds references in unsaved files;odl hookreports only the edited file's findings;odl mcprejects a string where a list is expected; the LSP, hook and editor integrations lint JavaScript.- Upgrade rules: U1701 keeps the
attrsof columns added to a list through an xpath, renames inside nested xpaths go to the right model, version guards on the new name count, U1902 gives no fix for a name Python would mangle. - ODOO004, ODOO008 and ODOO013 false positives; widgets and OWL templates no longer go stale in the LSP.
odl check | headno longer panics.
Performance
- Hints about where a missing model or field lives parse only modules that mention it (5.3 s → 0.5 s on a large addons path). (#127)
- The index computes line numbers by index and parses modules and their files in parallel. (#139)
Docs
v0.1.0-alpha.17
Immutable
release. Only release title and notes can be modified.
Changed defaults
Defaults that match the checks OCA's CI runs today, measured over every OCA repository on 18.0 and 19.0. (#115)
- Opt-in now: PO007
po-pretty-format(every OCA repository disables it), XML002, XML003, XML009 and XML024 (style checks newer than the hooks OCA runs), and MOD009field-string-redundant, which W8113 covers. Select them by code to keep them. - W8113
attribute-string-redundantgets a safe fix that removes the redundant label. - C8116
manifest-superfluous-keyleaves"installable": Truealone;keys-values-true = ["active", "installable"]restores pylint-odoo's behaviour. - ODOO001
missing-dependsreports stored computes only;[rules.missing-depends] non-stored = truereports non-stored ones too.
Fixes
False positives found by running every rule over the OCA repositories on 18.0, 19.0 and 20.0. (#111)
- PO rules skip documentation catalogs (
doc/,docs/,LC_MESSAGES/). - Removed models and fields that a dependency defines again are not reported.
- A module's own field classes (
JobSerialized(...),fs_fields.FsFolder()) are known to ODOO004, ODOO007 and ODOO009. _inheritskeyed by a class attribute anddelegate=Truewithcomodel_name=are seen as delegations.- ODOO005 knows the XML ids Odoo creates at install (
account.1_...of chart templates,field_*of delegated fields) and ofweb, and no longer reads a chart template'sref()in anevalas Odoo's. - ODOO010 leaves abstract models that leave a compute to their heirs alone.
- ODOO011 skips
specialbuttons and buttons an extension inserts at a button. - ODOO015 sees widgets registered in a chain (
.add(...).add(...)). - U1712 does not report
flush()on an object in a private attribute; the rename rules skip OpenUpgrade'sopenupgrade_scripts.
v0.1.0-alpha.16
Immutable
release. Only release title and notes can be modified.
Features
- PO105
po-translation-missing: with[rules.po-translation-missing] languages = [...], reports a module with translatable terms but noi18n/<lang>.po, and a.pothat leaves terms of the.potuntranslated. (#108) - MOD011
readme-fragments-missing(opt-in): an installable module withoutreadme/DESCRIPTION.mdor.rst. (#109) - MOD012
module-icon: with[rules.module-icon](icon,replace,paths), reports a missing icon and an outdated one (oca-2015,oca-2025-01,sha256:<hex>or a file), and keeps a module's own icon;odl check --fixcopies the configured icon. (#109) - MOD013
module-without-tests(opt-in): a module with Python models and notests/test_*.py. (#109) - XML103
xml-inside-form-container(opt-in): a view extension that adds fields inside the whole<sheet>or<form>; settings views are skipped. (#109)
v0.1.0-alpha.15
Immutable
release. Only release title and notes can be modified.
Features
- OWL 3 in Odoo 20.0: U2031–U2035 for the hooks,
t-portal,t-escandt-refchanges, and_rec_names_searchtuples (U2035, opt-in). (#103) - U2036
upgrade-owl3-template-this: component templates read the component throughthis.in OWL 3; safe fix. (#106) odl readme:[readme] style = "obs"writes Markdown READMEs without OCA branding, withorg,repo,branchandremove-rst. (#104)
Fixes
v0.1.0-alpha.14
Immutable
release. Only release title and notes can be modified.
Fixes
- Drops the unused
quick-xmldependency, which carried RUSTSEC-2026-0194 and RUSTSEC-2026-0195. Crates that embed odoo-lint now pass cargo-deny. (#100)
v0.1.0-alpha.13
Immutable
release. Only release title and notes can be modified.
New
- JavaScript: odl now reads the JavaScript of a module's
static/srcandstatic/tests, parsed with oxc.- Upgrade rules:
patch()with a name (U1722, safe fix),unpatch(U1723), and a class in the field registry instead of a descriptor (U1724) for 17.0; therpcservice (U1812) and the legacyWidget(U1813) for 18.0. (#95)
- Upgrade rules:
- ODOO015–ODOO017: view widgets, a component's
static template, andt-inherit/t-callthat no module in the dependencies registers or defines. They run when Odoo's sources with theirstaticfolders are on the addons path. (#98) odl formatalso formats SCSS, CSS and Less with lax-css, moving only whitespace. (#94)- Renamed XML ids per Odoo version (U1590–U1990), checked against the Odoo sources; safe fix. (#92)
- upgrade-check: "ready" now says it covers the code only. The report names
dependsthat odl cannot find for the target, and the JSON hasscopeandunresolved_depends. (#97)
Fixes
v0.1.0-alpha.12
Immutable
release. Only release title and notes can be modified.
New
odl format: formats XML with lax-markup, moving only whitespace. Domains, entities and text stay as written. Before writing, odl checks that the content (text, record field values, comments) is unchanged; if it would change, the file is left as it is. Replaces prettier's XML plugin. (#91)odl requirements: writesrequirements.txtfrom the manifests'external_dependencies. The output is byte-identical to OCA'soca-gen-external-dependencies, without building packages. (#89)- MOD010 manifest-website: the website set in the configuration, with a fix. Replaces
oca-fix-manifest-website. (#88) - OWL001–OWL003: OWL templates in the assets:
t-foreachwithoutt-key,t-raw, andt-on-*handlers that are not functions. (#90) - Renamed and removed models and fields per Odoo version (U1590–U1991), from OpenUpgrade's migration scripts and analysis, checked against the Odoo sources of each version. Renames have a safe fix. (#85, #86)
- ODOO014 action-read:
env.ref(...).read()[0]on an action, which raises an access error for users who are not administrators; unsafe fix to_for_xml_id. (#84) - U1811: the
http_routingslug helpers, which becameir.httpclass methods in Odoo 18; safe fix. (#83) - U1924:
_notify_progress, deprecated in Odoo 19 for_commit_progress. (#82) - Language server: completion of methods after a record (
order.). (#87)