Runner tool to run Odoo project using pew virtualenvs
Project description
odooquickrun
A simple command-line tool to manage Odoo projects using a pew-managed virtual environment.
๐ฆ Installation
Install directly from GitHub or your local source:
pip install odooquickrun
โ Uninstallation
To remove the tool:
pip uninstall odooquickrun
๐ Usage
Prerequisite: Ensure you have created and activated the pew virtual environment for your project before running these commands.
๐ Init a New Project
Scaffold a new Odoo project with the standard layout and clone Odoo source code.
odooquickrun init <project_name> [-v <version>] [--no-squash]
-v/--version: Odoo version branch to clone (default:19.0).--no-squash: Clone full git history instead of shallow (depth=1).
This creates:
<project_name>/
โโโ addons/requirements.txt
โโโ config/dev.conf
โโโ project/requirements.txt
โโโ odoo/ โ cloned from GitHub
โโโ .gitignore
๐ฅ๏ธ Odoo Server Operations
Start Odoo
odooquickrun start
Start in Debug Mode
Running with debugpy on port 5678.
odooquickrun debug
Upgrade Modules Update specific modules in a database.
odooquickrun upgrade -d <db_name> -m <module1,module2,...>
-d: Database name.-m: Comma-separated list of modules to upgrade.
๐๏ธ Database Operations
You can manage your local PostgreSQL databases directly using the db command.
Note: The default database port is
5432. You can specify a custom port for any of the commands below using the--db-port <port>option.
1. Database Management
List all databases (shows owner and size)
odooquickrun db info
Drop databases Delete one or multiple databases.
odooquickrun db drop <db1,db2,...> [options]
<db1,db2,...>: Comma-separated list of database names (e.g.,test_db,demo_db).-f/--force: Skip confirmation prompt (useful for automation).
2. User (Role) Management
List all users (shows superuser & createdb status)
odooquickrun db list_users
Create a new user
Creates a user with CREATEDB permission (required for Odoo to create its own databases).
odooquickrun db create_user <username> <password>
Drop a user Permanently delete a postgres user/role.
odooquickrun db drop_user <username> [-f]
3. Database Cleaning
Execute a SQL cleaning script
Run a .sql file against a database (e.g., for data anonymization or cleanup).
odooquickrun db clean <database> -f <path/to/file.sql> [--force]
-f/--file: Path to the SQL file to execute (required).--force: Skip confirmation prompt.
๐ Project Structure
This CLI is designed to be used inside a pew-managed virtualenv containing an Odoo project, structured as follows:
<project_root>/
โ
โโโ odoo/ # Odoo core (source code)
โ
โโโ addons/
โ โโโ custom_3rd_party_addons_1/ # 3rd party modules (OCA, ...)
โ โ โโโ module_a/
โ โ โโโ module_b/
โ โโโ custom_3rd_party_addons_2/
โ โ โโโ module_c/
โ โ โโโ module_d/
โ ...
โ
โโโ project/ # Customized modules for project
โ โโโ project_module_1/
โ โโโ project_module_2/
โ โโโ project_module_3/
โ
โโโ config/
โโโ local.conf (or dev.conf)
Notes:
- You don't need to specify the
addons_pathin the.conffile; the script will automatically calculate and prepare it for you based on the folder structure above.
๐ odoo.sh Project Support
odooquickrun automatically detects whether your project uses the standard layout or an odoo.sh setup.
Detection Logic
- If
config.shexists in the project root โ odoo.sh mode - Otherwise โ regular mode (standard layout)
odoo.sh Project Structure
<project_root>/
โโโ config.sh # Project configuration (REQUIRED for detection)
โโโ odoo.sh # Original launcher (optional, not used by odooquickrun)
โโโ Makefile # Optional
โโโ <project_dirs>/ # Custom modules (referenced by PROJECT_DIRS)
โโโ module_a/
โโโ module_b/
config.sh Variables
| Variable | Description | Default |
|---|---|---|
VERSION |
Odoo version (e.g., 17.0) |
Required |
PROJECT |
Project name | Directory name |
PROJECT_DIRS |
Path(s) to custom addons | โ |
VENV |
Virtualenv name | venv-odoo{VERSION} |
DB |
Database name | v{VERSION}{e/c}_{PROJECT} |
IP |
Listen address | 127.0.0.1 |
HTTP_PORT |
Listen port | 8069 |
ODOO_ROOT_DIR |
Root dir for Odoo source | ~/code/odoo |
EXTRA_ADDONS_PATH |
Additional addons paths | โ |
EXTRA_PARAMS |
Extra odoo-bin parameters | โ |
ENTERPRISE |
Enable enterprise (1/0) |
1 |
๐ Requirements
- Python 3.7+
pewfor managing virtual environmentsodoo-binavailable in your Odoo project path- PostgreSQL client tools (
psql) installed and added to PATH
๐ค Author
Phรบc Trแบงn Thanh (Felix)
- ๐ง Email: phuctran.fx.vn@gmail.com
- ๐ Github: @phuctranfxvn
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odooquickrun-1.0.5.tar.gz.
File metadata
- Download URL: odooquickrun-1.0.5.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4269e1f06486dc46c0d66ac510c34cd4f4e2bb0eb0a1d8f199e58866ad929ad3
|
|
| MD5 |
f5cf85e1cee809eb1dfc558855e55cf2
|
|
| BLAKE2b-256 |
d7c06ed0969c2d7a6029563fa6a171a6726cef56ddc91a693a337a0ccf5f5bf7
|
File details
Details for the file odooquickrun-1.0.5-py3-none-any.whl.
File metadata
- Download URL: odooquickrun-1.0.5-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f08041af7fa764db567858fd778253f50d7182c442add04c8075ff92cef2f454
|
|
| MD5 |
b64c1375c9c301bd32bd2a36c70b104f
|
|
| BLAKE2b-256 |
e53bba9e50a656b9f59ac549726ffad833c72895eac0320edfafcdb6a5f801e5
|