Hot-upgrade Odoo modules on save — no manual upgrades, no container restarts
Project description
odoo-hotupgrade
Hot-upgrade Odoo modules the instant you save. No manual "Apps → Upgrade", no container restarts, no context switch.
Save a .py, .xml, or .js file and watch the module upgrade + browser refresh happen automatically.
pip install odoo-hotupgrade
odoo-hotupgrade watch ./addons --proxy
Open http://localhost:8070/web — auto-reload active.
How it works
On the server side, it upgrades Odoo modules in-place via XML-RPC or Docker exec. No container restart, no state loss — just the module you changed (plus dependents).
On the client side, it sends a WebSocket message that tells the browser to refresh after the upgrade completes.
File change → debounce (500ms) → classify change type
├─ CSS/JS/static assets → browser reload only (<500ms)
├─ Python method-only → browser reload only (AST detected, <500ms)
├─ model/field/view → hot upgrade module + dependents via RPC → browser reload (~2-6s)
└─ __init__.py (root) → full container restart → poll port → browser reload (~30s)
Quickstart
# Auto-detect your Odoo setup and write odoo-hotupgrade.toml
odoo-hotupgrade init
# Watch with auto-inject proxy (no bookmarklet needed)
odoo-hotupgrade watch ./addons --proxy
# Watch using Docker exec instead of RPC
odoo-hotupgrade watch ./addons --proxy --docker
# Or run with just the config file
odoo-hotupgrade watch
Change routing
| Change type | Server action | Latency |
|---|---|---|
*.js, *.css, static/** |
None (browser reload only) | <500ms |
| Python method (no model fields) | None (AST-detected safe) | <500ms |
models/*.py field/model changes |
Hot upgrade module + transitive dependents | ~2-6s |
views/*.xml, data/*.xml, security/*.xml |
Hot upgrade module | ~2-6s |
__manifest__.py |
Hot upgrade + rebuild dependency graph | ~2-6s |
__init__.py (module root) |
Container restart + poll | ~30s |
Proxy mode
--proxy runs a local HTTP proxy that injects a WebSocket snippet into every HTML page. No browser extensions, no bookmarklet setup.
odoo-hotupgrade watch ./addons --proxy
Ports auto-detect (Docker mapping → port scan). Proxy defaults to odoo-port + 1.
Alternatives
# Bookmarklet — drag to bookmarks bar
odoo-hotupgrade bookmarklet
# Console snippet — paste in dev tools
odoo-hotupgrade snippet
Upgrade methods
| Method | Default? | Works with | How |
|---|---|---|---|
| RPC | ✅ (default) | Docker, bare metal, PyCharm, VM | XML-RPC to Odoo's /web/dataset/call_kw |
| Docker | --docker |
Docker only | docker exec + Odoo CLI |
Authentication
Admin credentials come from environment variables (never commit secrets):
export ODOO_ADMIN_USER="admin"
export ODOO_ADMIN_PASSWORD="your_password"
Fallback: [odoo] section in config file. Default: admin / admin.
CLI reference
Usage: odoo-hotupgrade watch [OPTIONS] [ADDONS_PATHS]...
--config, -c FILE Config file (default: odoo-hotupgrade.toml)
--container TEXT Docker container name/ID
--db TEXT Odoo database name
--ws-port INT WebSocket port (default: 8765)
--ws-host TEXT WebSocket bind address (default: 127.0.0.1)
--proxy Auto-inject proxy mode
--proxy-port INT Proxy listen port (default: odoo-port + 1)
--odoo-port INT Odoo HTTP port (default: auto-detect)
--docker Use Docker exec (default: RPC)
--no-live Disable live status panel
Configuration
[odoo]
addons_path = ["./addons", "./enterprise"]
database = "dev"
container = "odoo18_app"
[watch]
debounce_ms = 500
ignore = ["__pycache__", "*.pyc", ".git", "node_modules"]
websocket_port = 8765
[upgrade]
method = "rpc" # or "docker"
max_depth = 1 # transitive dependency depth
[upgrade.rpc]
host = "localhost"
port = 8069
Requirements
- Python 3.10+
- Docker (only for
--dockerupgrade method) - Odoo 16+ (tested on 18)
License
MIT
Project details
Release history Release notifications | RSS feed
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 odoo_hotupgrade-0.1.0.tar.gz.
File metadata
- Download URL: odoo_hotupgrade-0.1.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
264e51951f211bcd77a1f354fd2ce4dd0216b9251b8f86e2523a5c6be63e7334
|
|
| MD5 |
b1d8a013eb38a254662b6e4b50aceff8
|
|
| BLAKE2b-256 |
2b24c3e2ea1fa16d00a9db4c8d2317b2a85163c0c149122d099126ce82341293
|
File details
Details for the file odoo_hotupgrade-0.1.0-py3-none-any.whl.
File metadata
- Download URL: odoo_hotupgrade-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f66e7996a6ea9604566218e0583c94c79c6b3827f055d6f47795eb45acf72470
|
|
| MD5 |
8b2412f344cd2879ed26abdc7afb5930
|
|
| BLAKE2b-256 |
e99350f0ee973c177058da4f9643d78cf135583ed4ff830f6ecff7ef7f68040a
|