Skip to main content

click-odoo scripts collection

Project description

click-odoo-contrib
==================

.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. image:: https://badge.fury.io/py/click-odoo-contrib.svg
:target: http://badge.fury.io/py/click-odoo-contrib

``click-odoo-contrib`` is a set of useful Odoo maintenance functions.
They are available as CLI scripts (based on click-odoo_), as well
as composable python functions.

.. contents::

Scripts
~~~~~~~

click-odoo-initdb (beta)
------------------------

.. code::

Usage: click-odoo-initdb [OPTIONS]

Create an Odoo database with pre-installed modules.

Almost like standard Odoo does with the -i option, except this script
manages a cache of database templates with the exact same addons
installed. This is particularly useful to save time when initializing test
databases.

Cached templates are identified by computing a sha1 checksum of modules
provided with the -m option, including their dependencies and
corresponding auto_install modules.

Options:
-c, --config PATH ...
...
-n, --new-database TEXT Name of new database to create, possibly from
cache. If absent, only the cache trimming
operation is executed.
-m, --modules TEXT Comma separated list of addons to install.
[default: base]
--demo / --no-demo Load Odoo demo data. [default: True]
--cache / --no-cache Use a cache of database templates with the exact
same addons installed. Disabling this option also
disables all other cache-related operations such
as max-age or size. Note: when the cache is
enabled, all attachments created during database
initialization are stored in database instead of
the default Odoo file store. [default: True]
--cache-prefix TEXT Prefix to use when naming cache template databases
(max 8 characters). CAUTION: all databases named
like {prefix}-____________-% will eventually be
dropped by the cache control mechanism, so choose
the prefix wisely. [default: cache]
--cache-max-age INTEGER Drop cache templates that have not been used for
more than N days. Use -1 to disable. [default:
30]
--cache-max-size INTEGER Keep N most recently used cache templates. Use -1
to disable. Use 0 to empty cache. [default: 5]
--help Show this message and exit.

click-odoo-uninstall (stable)
-----------------------------

.. code::

Usage: click-odoo-uninstall [OPTIONS]

Options:
-c, --config PATH ...
-d, --database TEXT ...
...
-m, --modules TEXT Comma-separated list of modules to uninstall
[required]
--help Show this message and exit.

click-odoo-upgrade (stable)
---------------------------

.. code::

Usage: click-odoo-upgrade [OPTIONS]

Upgrade an Odoo database (odoo -u), taking advantage of
module_auto_update's upgrade_changed_checksum method if present.

Options:
-c, --config PATH ...
-d, --database TEXT ...
...
--i18n-overwrite Overwrite existing translations
--upgrade-all Force a complete upgrade (-u base)
--help Show this message and exit.

Useful links
~~~~~~~~~~~~

- pypi page: https://pypi-hypernode.com/project/click-odoo-contrib
- code repository: https://github.com/acsone/click-odoo-contrib
- report issues at: https://github.com/acsone/click-odoo-contrib/issues

.. _click-odoo: https://pypi-hypernode.com/pypi/click-odoo

Credits
~~~~~~~

Contributors:

- Stéphane Bidoul (`ACSONE <http://acsone.eu/>`_)
- Thomas Binsfeld (`ACSONE <http://acsone.eu/>`_)

Maintainer
~~~~~~~~~~

.. image:: https://www.acsone.eu/logo.png
:alt: ACSONE SA/NV
:target: https://www.acsone.eu

This project is maintained by ACSONE SA/NV.

Changes
~~~~~~~

.. Future (?)
.. ----------
.. -

1.0.3 (2018-05-30)
-----------------
- fix: handle situations where two initdb start at the same time
ending up with an "already exists" error when creating the cached template

1.0.2 (2018-05-29)
------------------
- fix: initdb now stores attachments in database when cache is enabled,
so databases created from cache do not miss the filestore

1.0.1 (2018-05-27)
------------------
- better documentation
- fix: initdb now takes auto_install modules into account

1.0.0 (2018-05-27)
------------------
- add click-odoo-initdb

1.0.0b3 (2018-05-17)
--------------------
- be more robust in rare case button_upgrade fails silently

1.0.0b2 (2018-03-28)
--------------------
- uninstall: commit and hide --rollback
- upgrade: refactor to add composable function


1.0.0b1 (2018-03-28)
--------------------
- upgrade: save installed checksums after full upgrade


1.0.0a1 (2018-03-22)
--------------------
- first alpha
- click-odoo-uninstall
- click-odoo-upgrade


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

click-odoo-contrib-1.0.3.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

click_odoo_contrib-1.0.3-py2.py3-none-any.whl (11.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file click-odoo-contrib-1.0.3.tar.gz.

File metadata

File hashes

Hashes for click-odoo-contrib-1.0.3.tar.gz
Algorithm Hash digest
SHA256 b38e43309a387314baece24b206f3877fe3f50db717a1fc04a69bb17feee37dc
MD5 a0963714154269be5b4208d2f511cf49
BLAKE2b-256 43266fa947fad40fa64869bf24a6dff0b7ad9199f021a26f441b7a85d6fc7479

See more details on using hashes here.

File details

Details for the file click_odoo_contrib-1.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for click_odoo_contrib-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 57054292d453a727fbf5de3316985b8fe27411a17c7fdb01b38ae3c568b200ac
MD5 cac131993b906a6f5113e7118169b5cb
BLAKE2b-256 51722dedcb7d78586d668b861372f8af3535b3489abc07e1fe1689aaa8583da1

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