Skip to main content

Odoo CLI Tools

Project description

License: LGPL-3

xodoo is collection of various scripts intended to be used for odoo. It is based on click-odoo to connect and manage odoo.

Scripts

xodoo-migrate

Migration tool intended to run various migration scripts for Odoo. It should be used when it does not make sense to run module migrations (e.g. need to generate some customer specific data that is not directly related with any module).

Usage: xodoo-migrate [OPTIONS] PATH

  PATH:  migration file or directory of migration files.

  Migration file must end with .py extension and must have 'migrate' function
  that expects 'env' and 'shared_data' argument.

  'shared_data' argument is a dictionary that collects previous
  migration scripts returned values (key is migration script name).
  If return (of 'migrate' function) is None, it is not included in
  shared_data.

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.
  -f, --force TEXT           Specify migration file names (without extension)
                             to force migrate. It will migrate even if it was
                             already migrated. Must be subset of migration
                             files provided in a path.
  -s, --sort-algorithm TEXT  Sort algorithm to sort migration files before
                             migration. Possible choices: sorted, natsorted
  --help                     Show this message and exit.

If you use --rollback option, make sure you do not run cr.commit() in your scripts, otherwise it will have no effect (script changes are automatically committed if they do not fail at the end of transaction).

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

xodoo-0.2.0.tar.gz (52.7 kB view details)

Uploaded Source

Built Distribution

xodoo-0.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file xodoo-0.2.0.tar.gz.

File metadata

  • Download URL: xodoo-0.2.0.tar.gz
  • Upload date:
  • Size: 52.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for xodoo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7f50b28d4a3f7d338a70baf70b9d9d36477e5936b3637288172c44c7c866e9a7
MD5 9fd90bf79df76393f6521e6ab5e5d236
BLAKE2b-256 f8c1e2fd275f0f5066c02d521df243733e069dfb32004e12799d049d4626235b

See more details on using hashes here.

File details

Details for the file xodoo-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: xodoo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for xodoo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82be8306eb6c53120049079806b0595c2b8c1d638e69d0f0c9230eb12f7551cb
MD5 d8bb9b0efdc056bc7765c00ad5b928db
BLAKE2b-256 b2202684d3fd6dd0910a5da4f0ae33e19ced4c429282bd5ad0c660d679192e41

See more details on using hashes here.

Supported by

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