Skip to main content

Odoo Tools

Project description

Odoo Tools

Python package codecov

A library that provide command line tools to manage an Odoo environment. The main purpose of the library is to provide a programmatic API that lets you build tools to automate management of odoo environment.

How to install

pip install odoo-tools

Documentation

You can check the documentation hosted here.

Example of use

It can be used to find modules in addons paths. It can be used to discover addons paths in directory in a way to provide an easy way to manage odoo.cfg files without having to break your head managing things.

For example remove all modules that can't be installed in every configured addons paths:

env = Environment()

for module in env.modules.list(filters={'non_installable'}):
    module.remove()

Define addons paths based on paths in /var/lib/addons:

env = Environment()
env.context.custom_paths.add(Path("/var/lib/addons"))
env.set_config('addons_path', env.addons_paths())

This will not simply add /var/lib/addons to the addons_path. It will search into this folder for directories that have installable addons in them. addons_paths() returns all possible addons paths detected based on the environment variables, odoorc file and actual state of the environment. So it returns everything you need to start odoo later.

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-tools-0.1.2.tar.gz (63.3 kB view hashes)

Uploaded source

Built Distribution

odoo_tools-0.1.2-py3-none-any.whl (84.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page