Skip to main content

Generate, compare and update Odoo config files per version.

Project description

odoo-config

A small CLI that generates an Odoo config file, adapted for the target Odoo version. Replaces the hand-maintained server.conf template in remoteoi and is meant to be called as a configuration step by deploy.py, with per-instance values coming from deploy.yml.

Local development

Standard template tooling (uv + make):

make install   # uv sync + pre-commit install
make check     # lock check + pre-commit + ty
make test      # pytest

Other tasks: regenerate the CLI reference with uv run typer odoo_config.main utils docs --name odoo-config --output CLI.md, and the schema with uv run python scripts/build_schema.py (see Schema below).

Commands

See CLI.md — generated from the code, the source of truth — or odoo-config <command> --help for every command and flag (including the --output-format values).

Two behaviours the flag list can't express:

  • Ad-hoc overrides: beyond the documented flags, any --<key>=<value> overrides a single option, e.g. --max-cron-threads=0 (dashes → underscores).
  • Merge precedence, low to high: preset → --from files → environment → --* overrides.

Schema

The schema is two files, merged at runtime by schema.load_schema():

  • odoo_config/options.toml — the odoo standard: option set, defaults, version availability (min/max_version) and per-version default drift (by_version), mined from Odoo's tools/config.py across 13.0–19.0. It is generated (a vendored snapshot, like a lockfile) — do not edit by hand. Regenerate it only when the supported odoo version set changes:

    uv run python scripts/build_schema.py --odoo /path/to/odoo   # or set ODOO_PATH
    

    The odoo root is a parameter, but its layout is fixed: one numeric version directory per version, each holding odoo/tools/config.py. Limit the set with --versions 17.0,18.0,19.0.

  • odoo_config/overlay.toml — the trobz layer: customized defaults, comments, sections (ir.config_parameter, queue_job), presets, and non-core extras (sentry_*, legacy networking, etc.). Edit this freely; changes take effect immediately, no regeneration needed.

    Dotted keys in presets (e.g. ir.config_parameter options like ribbon.name) must be quoted in TOML so the dot is treated as part of the name, not a sub-table separator: "ribbon.name" = "" — not ribbon.name = "".

Overlay values win. A pinned overlay default forces that value on every version (the mined by_version is dropped); to keep per-version trobz values, add a [options.<key>.by_version] table in the overlay.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_config-0.3.0.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odoo_config-0.3.0-py3-none-any.whl (28.7 kB view details)

Uploaded Python 3

File details

Details for the file odoo_config-0.3.0.tar.gz.

File metadata

  • Download URL: odoo_config-0.3.0.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for odoo_config-0.3.0.tar.gz
Algorithm Hash digest
SHA256 43ad7c47d0a7efb6d57db15174956c36421a897e6f4f8987ebd8730ca0b8d3cb
MD5 d08860abc6a5b1ee366c2b2cb9341d0e
BLAKE2b-256 b9587c67e58cfbe12bb153f0d032bb9313c85bb75390641c09ed038b7452899d

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_config-0.3.0.tar.gz:

Publisher: release.yaml on trobz/odoo-config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file odoo_config-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: odoo_config-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 28.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for odoo_config-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ade850330789f70f8d4fa0326aa1b775d55ef76345509c18bfa5f9bf61e36074
MD5 afbdd5c23665750e3bf51e9cc3e89837
BLAKE2b-256 ccc6d0f7f4d56d473bd48f6634e89d551ddb5373b5b9f0b16de230419b01e892

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_config-0.3.0-py3-none-any.whl:

Publisher: release.yaml on trobz/odoo-config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page