Skip to main content

A command-line tool to spin up isolated Odoo dev environment in seconds.

Project description

odoo-venv

A command-line tool to spin up isolated Odoo dev environment in seconds.

Installation

pip install odoo-venv

Quick Start

1. Direct CLI Arguments

Example:

odoo-venv create 17.0 \
    --odoo-dir ~/code/odoo/odoo/17.0 \
    --addons-path ~/code/odoo/addons/web,~/code/odoo/addons/mail \
    --python-version 3.10 \
    --install-addons-dirs-requirements \
    --extra-requirement "debugpy,ipython"

This command creates a virtual environment for Odoo 17.0 with the following specifications:

  • Odoo source is located at ~/code/odoo/odoo/17.0.
  • Additional addons are in ~/code/odoo/addons/web and ~/code/odoo/addons/mail.
  • The environment uses Python 3.10.
  • It installs dependencies from requirements.txt files found in the addons paths.
  • It also installs debugpy and ipython.

2. Using Presets

For recurring configurations, you can define presets in a presets.toml file, in ~/.local/share/odoo-venv/.

There are 4 out-of-box presets: local, demo, project, ci (see src/odoo_venv/assets/presets.toml)

Example:

odoo-venv create 17.0 \
    --odoo-dir ~/code/odoo/odoo/17.0 \
    --addons-path ~/code/odoo/addons/web,~/code/odoo/addons/mail \
    --preset demo

This command will apply all the options from the demo preset. You can still override any preset option by providing a direct CLI argument. For example, to use a different extra_requirement for a specific run:

odoo-venv create 17.0 \
    --odoo-dir ~/code/odoo/odoo/17.0 \
    --addons-path ~/code/odoo/addons/web,~/code/odoo/addons/mail \
    --preset demo \
    --extra-requirement "pylint"

3. As a Library

The tool can also be used as lib in a custom python script

Example:

from odoo_venv import create_odoo_venv

create_odoo_venv(
    odoo_version="17.0",
    odoo_dir="~/code/odoo/odoo/17.0",
    venv_dir="./.venv",
    python_version="3.10",
    addons_paths=["~/code/odoo/addons/web", "~/code/odoo/addons/mail"],
    install_addons_dirs_requirements=True,
    extra_requirements=["debugpy", "ipython"],
)

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_venv-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

odoo_venv-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file odoo_venv-0.1.0.tar.gz.

File metadata

  • Download URL: odoo_venv-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for odoo_venv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c5590b1d736cc0026cba50c826b29e340f234eaf6fec89ce112d4af89aa7d93
MD5 ca7124442041a9034f9e0a4e66ea0a7a
BLAKE2b-256 c19c9b8bb23e85f98706f122808cdb3355753bfa329369e6f6c0d0860b23a43b

See more details on using hashes here.

File details

Details for the file odoo_venv-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: odoo_venv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for odoo_venv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 330f660212e075692e90842d8543e4410be1ec48a4c67a725b41c3cac1ec862f
MD5 43d1b192d5f6cd3877be6d8422def854
BLAKE2b-256 cfb7e17d5caeddf9bf249ba2e657465311aed7f702be09ca104394c6327aae19

See more details on using hashes here.

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