Jump to
↵select↑↓navigateescclose

Standards

Modules

Every module of odoo-nix's standards, the keys each takes in [tool.odoo-nix] or a profile, their defaults, and the rules between modules.

Updated
Tags
  • standards
  • modules
  • configuration
  • reference
On this page

A module is one switch, <module>.enable, and the keys that tune it. Set them in a profile or in your table, as a subtable or as dotted keys:

[tool.odoo-nix]
schema = 1
profile = "recommended"
commits.enable = true

[tool.odoo-nix.python-lint]
extra-select = ["PLR"]

odoo-nix config modules.<module> prints the effective switch, after the module rules; odoo-nix config <module>.<key> prints a key. The defaults below are the schema's: recommended@2.3 sets the same values and turns on the modules marked rec.

Repository keys

These belong to the repository's table alone; a profile that sets one is refused. Both a profile and the table carry schema = 1, and the profile's own keys (name, description, extends, requires-odoo-nix, [[retire]], [[extra-files]]) are refused in the table.

KeyMeaning
profileminimal, recommended, recommended@<minor>, github:<owner>/<repo>[/<ref>] or ./<dir> (Profiles)
shape"project" or "addons", when the files show both
seriesthe Odoo series ("18.0"), overriding .odoo-series and the other sources
integration-branchthe branch pull requests target; --standards writes it when origin/HEAD names another branch than the default (develop under develop+series, main for a project)
repo<owner>/<name>, for a checkout whose remote is not origin
retire-keeppaths the retire rules must leave alone
[[tool.odoo-nix.untested]]addon = "<name>" and reason = "…" (at least 10 characters), both required: an installable addon the test gate does not install. The coverage ratchet refuses a new entry in a pull request

Modules and keys

ModulerecWhat it managesKeys (default)
dev-shellonthe flake.nix inputs block, .envrc, the .gitignore block. Required: enable = false is exit 2odoo-nix-url ("": github:Avunu/odoo-nix/release-<major>; keep it a github: URL, since the CI workflows that install odoo-nix-tools read a github lock node only: CI)
editorconfigon.editorconfig: OCA's sections for the series, plus 2-space Nix and shell—
python-lintonruff with OCA's per-series rules in .ruff.toml, the locked ruff in tools/.venvextra-select ([]), ignore ([]), per-file-ignores ({}), extend-exclude ([])
pylint-odooonpylint-odoo with OCA's .pylintrc and .pylintrc-mandatoryoptional-run (true: the optional checks run as an advisory hook)
addon-manifestonthe manifest rulesauthor ("": none required), licenses-allowed ([]: [org.license] when set, else OCA's list), website ("": none checked; a template with {repo}, {repo_name})
js-xmlonprettier and eslint for JavaScript and XML, locked in package.json and package-lock.jsonexclude ([]: path prefixes both skip, such as static/dist/)
ideoff.vscode/settings.json and .vscode/extensions.json, merged (Editors). Needs python-lint and js-xml—
testsonthe test gate: Odoo's tests with coverage, checklog-odoo, the coverage floorinitial-floor (0: fail_under, written once), goal (80, recorded for reference: no report shows it yet, and it is never a gate), checklog (true)
workflow-lintonactionlint and zizmor over .github—
shell-lintonshellcheck, when the repository has shell scripts—
nix-lintonnixfmt, statix and deadnix, when it has Nix files—
hygieneonOCA's pre-commit-hooks checks, check-json and check-yaml, the forbidden-file rules, .git-blame-ignore-revsforbid-contributing (true: keep OCA's rule against a CONTRIBUTING.md)
commitsoffcommitted.toml and the pull-request policyconvention ("conventional" or "odoo"), scopes ("addons": the addon names, or "any"), extra-scopes ([]), extra-types ([]), allow-stacked (true), pr-allowed-bases ([]), subject-length (100)
releasesoffthe post-merge bump of each addon's version and the series branch's fast-forward. Addon repositories only. Needs commits and cibranching ("develop+series" or "trunk"), version-scheme ("odoo-series" or "semver"), tag-prefix ("v" or ""; the prefix of release tags, which means nothing under odoo-series: that flow makes no tags), tool (standards-core's key: "none" turns the module off like enable = false; odoo-nix reads no other value)
packagingoffa whool pyproject.toml per addon (the whool-init hook). Addon repositories only—
dependaboton.github/dependabot.yml, GitHub Actions and the Nix inputs, one entry per target branchschedule ("weekly"), cooldown-days (7), target-branches ([]: the integration branch), auto-merge (true), auto-merge-policy ("decision-table" or "all"), update-branches (false)
cionthe CI callers (CI)runs-on (["ubuntu-latest"]), test-timeout-minutes (60), project-update ("0 6 * * 1", a project's scheduled odoo project update; "" for none), github-app ({ app-id = "", private-key = "" }: the names of the Actions variable and secret, never their values), schedules ({}: a cron per workflow, ci for one)
repo-policyoffrulesets and repository settings, applied by odoo-nix repo apply (Fleet). Needs cirequired-approvals (1), require-code-owner-review (false), required-checks ("gates"), release-bypass ("github-actions"; the CI App as "integration:<numeric id>"), secret-scanning (true), merge-methods (["squash"]), require-thread-resolution (true), delete-branch-on-merge (true), manage-default-branch (true), manage-features (true)
readmeoffa README per addon, and optionally a table of the addons in the root README.mdrequired (true), addons-table (false)
iconsoffstatic/description/icon.png per addon, checked by odoo-nix check iconsmin-size (128), max-bytes (102400), src-icon ("assets/addon-icon.png", relative to the org profile)

The [org] table (publisher, email, copyright-holder, license, github-owner, docs-url, dev-docs-url, support-url, repo-url) fills the placeholders the templates and hooks use; the built-in profiles leave each "" except dev-docs-url (https://github.com/Avunu/odoo-nix/tree/main/docs/standards, both) and repo-url (https://github.com/{repo}, recommended@2.3). A rule that needs a value that is empty is skipped.

Shape and module

Some modules only mean something in one shape. With the module on in the other, sync gives a notice and the module does nothing:

Moduleprojectaddons
releasesnotice: a project has no series branchthe develop+series flow
packagingnoticeone whool pyproject.toml per addon
check submodules (lint gate)every .gitmodules entry on branch = <series>n/a

A project keeps its addons under layout.customDir (custom by default): the lint hooks, the test gate and check manifests read them there, and never odoo/ or modules/.