Skip to main content

odoo-instance-utils

Alpha stage — not production-ready. This project is under active development. The API, CLI interface, and behavior may change without notice between releases. Use at your own risk; no backward compatibility guarantees until 1.0.

CLI utilities for auditing and managing Odoo instances.

Installation

pip install odoo-instance-utils[cli]

Usage

Usage: odoo-instance [OPTIONS] COMMAND [ARGS]...

Options:
  --installed-addons-only / --include-all-addons
  --help                          Show this message and exit.

Commands:
  addons        Addon management commands.
  exports       Export management commands.
  filters       Filter management commands.
  translations  Translation management commands.
  view          View management commands (requires click-odoo).

Addons

odoo-instance addons lint           Validate addons.yaml + repos.yaml
odoo-instance addons capture        Capture addon state from a remote instance
odoo-instance addons verify         Compare addons.yaml against the live DB
odoo-instance addons install <list> Install addons (comma-separated)
odoo-instance addons list           List addons and their status
odoo-instance addons why <module>   Show modules that depend on a module
odoo-instance addons resolve <m>    Resolve transitive dependencies
odoo-instance addons audit          Audit version mismatches, uncommitted changes
odoo-instance addons python-deps    List Python dependencies for instance addons
odoo-instance addons generate-addons-yaml   Generate addons.yaml for Doodba
odoo-instance addons generate-repos-yaml    Generate repos.yaml for git-aggregator
odoo-instance addons generate-repos-lock    Generate repos.lock.yaml with pinned SHAs

Exports

odoo-instance exports dump <ids>    Dump exports as JSON
odoo-instance exports restore <data> Restore exports from JSON

Filters

odoo-instance filters list          List all filters
odoo-instance filters dump <ids>    Dump filters as JSON
odoo-instance filters restore <data> Restore filters from JSON

View

odoo-instance view export <module>  Export views from a module
odoo-instance view diff <module>    Diff exported views against the database

Translations

odoo-instance translations load <file.py> [--force]

Load custom translation overrides from a Python file into an Odoo instance (Odoo ≥16, uses TranslationImporter / jsonb).

The file must define a TranslationOverride dataclass and a module-level translations dict keyed by language code:

# odoo/custom/configuration/translations/fr_FR.py
from dataclasses import dataclass

@dataclass(frozen=True)
class TranslationOverride:
    type: str       # model, code, selection, view
    name: str       # "model,field" or module name or XML-ID
    src: str        # original English text
    value: str      # translated text
    res_id: int = 0 # default 0; resolved via XML-ID for view types

translations = {
    "fr_FR": [
        TranslationOverride(
            type="code", name="base", src="Individual", value="Personne",
        ),
        TranslationOverride(
            type="code", name="base", src="Individuals", value="Personnes",
        ),
    ],
}

The command generates temporary PO files (one per language) and imports them via Odoo's TranslationImporter, which writes directly to the jsonb translation columns on each model's database table. All overrides are created with module="__custom__" so they survive module upgrades.

Use --force to overwrite existing translations instead of merging.

Development

git clone https://github.com/maisim/odoo-instance-utils
cd odoo-instance-utils
uv sync
pre-commit install

Releasing

This project uses commitizen with Conventional Commits and setuptools-scm for versioning.

Commits must follow the conventional format:

feat: add addon export command
fix: handle missing manifest in list-addons
refactor: extract addon resolution logic

To create a release:

cz bump                    # reads commits → bumps version → creates tag + CHANGELOG
git push --follow-tags

The GitHub Actions workflow then builds and publishes the matching version to PyPI.

License

MIT — see LICENSE.

Metadata

Release files for odoo-instance-utils 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odoo-instance-utils 0.5.0
File Size Uploaded Provenance Actions
odoo_instance_utils-0.5.0.tar.gz 97.9 kB With provenance Details for odoo_instance_utils-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for odoo-instance-utils 0.5.0
File Interpreter ABI Platform Actions
odoo_instance_utils-0.5.0-py3-none-any.whl Python 3 none any Details for odoo_instance_utils-0.5.0-py3-none-any.whl

Total release size: 130.0 kB

Release files / odoo_instance_utils-0.5.0.tar.gz

Download URL odoo_instance_utils-0.5.0.tar.gz
Size 97.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5417663efbe30ff185e6cf7564ba9942f9778af5bc83e581120009b49b34ba7f
BLAKE2b-256 checksum
How to use checksums
f0b3faa42f6f68584020bb0565b58000948a9b17de17d1ead5cafafe48ad21d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Release files / odoo_instance_utils-0.5.0-py3-none-any.whl

Download URL odoo_instance_utils-0.5.0-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c94ae58cf8a908ab1ac6f038e6943361f935760ae79f34ab54fe7590dea9337
BLAKE2b-256 checksum
How to use checksums
af2f563321d3d1fa892d8d7b95f261778728264edeb01e3c7e5930275da27f43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

Security for odoo-instance-utils 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for odoo_instance_utils-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page