CLI utilities for auditing and managing Odoo instances
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odoo_instance_utils-0.5.0.tar.gz.
File metadata
- Download URL: odoo_instance_utils-0.5.0.tar.gz
- Upload date:
- Size: 97.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5417663efbe30ff185e6cf7564ba9942f9778af5bc83e581120009b49b34ba7f
|
|
| MD5 |
81315ce0cf2e75cc83d37c9b9a526776
|
|
| BLAKE2b-256 |
f0b3faa42f6f68584020bb0565b58000948a9b17de17d1ead5cafafe48ad21d4
|
Provenance
The following attestation bundles were made for odoo_instance_utils-0.5.0.tar.gz:
Publisher:
python-publish.yml on maisim/odoo-instance-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odoo_instance_utils-0.5.0.tar.gz -
Subject digest:
5417663efbe30ff185e6cf7564ba9942f9778af5bc83e581120009b49b34ba7f - Sigstore transparency entry: 2085062511
- Sigstore integration time:
-
Permalink:
maisim/odoo-instance-utils@b5d3a7b38debffe39fc6d37cdcb2a164c1e5e76e -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/maisim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b5d3a7b38debffe39fc6d37cdcb2a164c1e5e76e -
Trigger Event:
push
-
Statement type:
File details
Details for the file odoo_instance_utils-0.5.0-py3-none-any.whl.
File metadata
- Download URL: odoo_instance_utils-0.5.0-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c94ae58cf8a908ab1ac6f038e6943361f935760ae79f34ab54fe7590dea9337
|
|
| MD5 |
395a141f32e130c3489bd9ede4267089
|
|
| BLAKE2b-256 |
af2f563321d3d1fa892d8d7b95f261778728264edeb01e3c7e5930275da27f43
|
Provenance
The following attestation bundles were made for odoo_instance_utils-0.5.0-py3-none-any.whl:
Publisher:
python-publish.yml on maisim/odoo-instance-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odoo_instance_utils-0.5.0-py3-none-any.whl -
Subject digest:
4c94ae58cf8a908ab1ac6f038e6943361f935760ae79f34ab54fe7590dea9337 - Sigstore transparency entry: 2085062604
- Sigstore integration time:
-
Permalink:
maisim/odoo-instance-utils@b5d3a7b38debffe39fc6d37cdcb2a164c1e5e76e -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/maisim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b5d3a7b38debffe39fc6d37cdcb2a164c1e5e76e -
Trigger Event:
push
-
Statement type: