Skip to main content

CLI utilities for auditing and managing Odoo instances

Project description

odoo-instance

This is a work in progress

odoo-instance is a command-line tool to manage Odoo instances with ease. It provides various subcommands to generate configuration files, retrieve repository information, and more.

Features

  • Generate repos.yml for Git repositories in your Odoo instance.
  • Retrieve and manage addon information.
  • List and manage Python dependencies for Odoo addons.

Installation

  1. Clone the repository:

    git clone https://github.com/maisim/odoo-instance-utils
    
  2. Navigate to the project directory:

    cd odoo-instance-utils
    
  3. Install the package:

    pip install -e .
    

Usage

odoo-instance

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

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

Options:
  -c, --config FILE               Specify the Odoo configuration file. Other
                                  ways to provide it are with the ODOO_RC or
                                  OPENERP_SERVER environment variables, or
                                  ~/.odoorc (Odoo >= 10) or
                                  ~/.openerp_serverrc.
  -d, --database TEXT             Specify the database name. If present, this
                                  parameter takes precedence over the database
                                  provided in the Odoo configuration file.
  --log-level TEXT                Specify the logging level. Accepted values
                                  depend on the Odoo version, and include
                                  debug, info, warn, error.  [default: warn]
  --logfile FILE                  Specify the log file.
  --rollback                      Rollback the transaction even if the script
                                  does not raise an exception. Note that if
                                  the script itself commits, this option has
                                  no effect. This is why it is not named dry
                                  run. This option is implied when an
                                  interactive console is started.
  --installed-addons-only / --include-all-addons
                                  Work with installed addons only (default) or
                                  include not installed addons
  --help                          Show this message and exit.

Commands:
  generate-repos-yaml  Generate repos.yml file for git-aggregator.
  list-addons         List addons and their status

odoo-instance generate-repos-yaml

Generate repos.yml file for git-aggregator. If your addons come from git repositories, this command will generate a repos.yml file for git-aggregate.

Usage
Usage: odoo-instance generate-repos-yaml [OPTIONS]

CLI Help
Usage: odoo-instance generate-repos-yaml [OPTIONS]

  Generate repos.yml file for git-aggregator. If your addons come from git
  repositories, this command will generate a repos.yml file for git-aggregate.

Options:
  -o, --output PATH  Output file for repos.yml
  --help             Show this message and exit.

odoo-instance list-addons

List addons and their status

Usage
Usage: odoo-instance list-addons [OPTIONS]

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

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

Options:
  -c, --config FILE               Specify the Odoo configuration file. Other
                                  ways to provide it are with the ODOO_RC or
                                  OPENERP_SERVER environment variables, or
                                  ~/.odoorc (Odoo >= 10) or
                                  ~/.openerp_serverrc.
  -d, --database TEXT             Specify the database name. If present, this
                                  parameter takes precedence over the database
                                  provided in the Odoo configuration file.
  --log-level TEXT                Specify the logging level. Accepted values
                                  depend on the Odoo version, and include
                                  debug, info, warn, error.  [default: warn]
  --logfile FILE                  Specify the log file.
  --rollback                      Rollback the transaction even if the script
                                  does not raise an exception. Note that if
                                  the script itself commits, this option has
                                  no effect. This is why it is not named dry
                                  run. This option is implied when an
                                  interactive console is started.
  --installed-addons-only / --include-all-addons
                                  Work with installed addons only (default) or
                                  include not installed addons
  --help                          Show this message and exit.

Commands:
  addon-why                   List modules that depend on the given module
  addons-python-dependencies  List python dependencies for the instance...
  generate-repos-yaml          Generate repos.yml file for git-aggregator.
  list-addons                 List addons and their status

odoo-instance generate-repos-yaml

Generate repos.yml file for git-aggregator. If your addons come from git repositories, this command will generate a repos.yml file for git-aggregate.

Usage
Usage: odoo-instance generate-repos-yaml [OPTIONS]

CLI Help
Usage: odoo-instance generate-repos-yaml [OPTIONS]

  Generate repos.yml file for git-aggregator. If your addons come from git
  repositories, this command will generate a repos.yml file for git-aggregate.

Options:
  -o, --output PATH  Output file for repos.yml
  --help             Show this message and exit.

odoo-instance list-addons

List addons and their status

Usage
Usage: odoo-instance list-addons [OPTIONS]

CLI Help
Usage: odoo-instance list-addons [OPTIONS]

  List addons and their status

Options:
  --minimize-list           Minimize the list of addons (to install) with the
                            game of dependencies
  --format [flat|json|csv]
  --help                    Show this message and exit.

odoo-instance addon-why

List modules that depend on the given module

Usage
Usage: odoo-instance addon-why [OPTIONS] ADDON_NAME

CLI Help
Usage: odoo-instance addon-why [OPTIONS] ADDON_NAME

  List modules that depend on the given module

Options:
  --help  Show this message and exit.

odoo-instance addons-python-dependencies

List python dependencies for the instance addons

Usage
Usage: odoo-instance addons-python-dependencies [OPTIONS]

CLI Help
Usage: odoo-instance addons-python-dependencies [OPTIONS]

  List python dependencies for the instance addons

Options:
  --help  Show this message and exit.
CLI Help
Usage: odoo-instance list-addons [OPTIONS]

  List addons and their status

Options:
  --format [flat|json|csv]
  --help                    Show this message and exit.

Development

TODO

TODO

  • add other subcommands

  • add tests

  • Refactor the cli layout to get a stuff like:
    odoo-instance addon why addon_name
    odoo-instance addons python-dependencies \

License

This project is licensed under the AGPL 3 License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

For any questions or suggestions, please open an issue or contact the maintainers.

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_instance_utils-0.4.3a0.tar.gz (83.4 kB view details)

Uploaded Source

Built Distribution

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

odoo_instance_utils-0.4.3a0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file odoo_instance_utils-0.4.3a0.tar.gz.

File metadata

  • Download URL: odoo_instance_utils-0.4.3a0.tar.gz
  • Upload date:
  • Size: 83.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for odoo_instance_utils-0.4.3a0.tar.gz
Algorithm Hash digest
SHA256 55dfbe548c21849dba7e96d906f74452a31ea8f67235fcd5aa472a57281b3c04
MD5 ed6cb8e3e9916540fb088ee3306adca3
BLAKE2b-256 7b0c654364a16d76598aefc492504f96291f0f55e8a6040952359d288ff46259

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_instance_utils-0.4.3a0.tar.gz:

Publisher: python-publish.yml on maisim/odoo-instance-utils

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_instance_utils-0.4.3a0-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_instance_utils-0.4.3a0-py3-none-any.whl
Algorithm Hash digest
SHA256 054c9115387a962a219e3ae29a58a925cb55d28f655bd758f3927f47cf857dcd
MD5 a641d1d33296a0f2a02dfe17f2b771e6
BLAKE2b-256 b18f22d42a79f6ccb86be08c93cb9e965421a6fe6b4c7e601078dce2635928c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_instance_utils-0.4.3a0-py3-none-any.whl:

Publisher: python-publish.yml on maisim/odoo-instance-utils

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