addon-watch
A live-reload runner for Odoo addons. Runs the server, and when an addon changes restarts it, upgrading only the modules that actually changed.
Odoo's own --dev=all reload needs the watchdog package and, even with it,
only re-imports Python. A new field, a changed view, a new access rule or a
migration still needs -u, which means stopping the server, remembering
which module you touched, and typing it out. addon-watch does that part.
$ addon-watch -c odoo.conf -d demo
watching /srv/addons for .py .xml .csv .sql .yml .yaml
>> /usr/bin/python3 /opt/odoo/odoo-bin -c odoo.conf -d demo --dev=all
** sale_order.py, sale_order_views.xml changed -> -u sales_extra
>> /usr/bin/python3 /opt/odoo/odoo-bin -c odoo.conf -d demo --dev=all -u sales_extra
** portal.py changed (code only, no upgrade)
>> /usr/bin/python3 /opt/odoo/odoo-bin -c odoo.conf -d demo --dev=all
No dependencies, one file of logic, Python 3.8+.
Install
pip install addon-watch
Or run it straight from a checkout, with no install at all:
python3 -m addon_watch -c odoo.conf -d demo
Use
addon-watch -c odoo.conf -d demo
odoo-bin is found in the current directory or above it, then on PATH;
--odoo-bin names it directly. What gets watched comes from the config's
addons_path, minus anything inside the Odoo install itself — core addons
are not what you are editing, and a stray touch there would upgrade half the
database. --addons DIR (repeatable) overrides that.
Anything after -- goes to odoo-bin:
addon-watch -c odoo.conf -d demo -- --http-port=8070 --log-level=warn
| Option | What it does |
|---|---|
-d, --database |
Database to run against. |
-c, --config |
Odoo config file; its addons_path decides what is watched. |
--addons DIR |
Watch this directory. Repeatable; replaces the config's list. |
--modules A,B |
Upgrade these on every restart instead of what changed. |
--upgrade-on-start |
Upgrade on the first boot too. Off by default. |
--odoo-bin PATH |
The odoo-bin to run. |
--python PATH |
The interpreter that runs it. Defaults to the current one. |
--ext .EXT |
Watch this extension. Repeatable. |
--code-only-dir NAME |
A directory inside a module that never needs -u. Repeatable. |
--poll SECONDS |
How often to scan. Default 0.2. |
What it decides
Which files matter. .py, .xml, .csv, .sql, .yml, .yaml — the
things a running Odoo cannot pick up on its own. static/ is skipped on
purpose: --dev=all serves those from disk, so a change there needs a
browser reload, not a restart. (Browsers cache static/src/js files hard,
because the URL carries the module version; hard-reload after editing one.)
Which module changed. A module is the nearest directory above the file
that holds a __manifest__.py, and the search stops at the watched root.
Editing crm_extra does not pay for upgrading sales_extra.
Whether the database needs telling. Changes under a module's
controllers/, tests/, tools/ or lib/ restart without -u: nothing
there is stored in the database, and skipping the upgrade is about a second
faster. Everything else — models, views, security, data, migrations,
manifests — gets -u.
When Odoo dies on a traceback, the watcher stops and waits for your next edit instead of restart-looping over the same failure.
Why polling
A scan of a few hundred addon files takes about a millisecond, so the poll
loop costs nothing and an event-based watcher (watchdog, watchexec,
fswatch) would save nothing measurable — while adding a dependency and a
platform surface. The latency that matters is the poll interval and the
debounce, both 0.2s, and Odoo's own boot, which is seconds.
Releasing
A tag publishes it. .github/workflows/release.yml builds, runs the tests
and uploads to PyPI through trusted
publishing -- an OIDC token
traded for an upload, so there is no API token to store or leak.
git tag -a v0.1.0 -m "addon-watch 0.1.0" && git push origin v0.1.0
Development
python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/python -m pytest
License
MIT
Metadata
Release files for addon-watch 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| addon_watch-0.1.0.tar.gz | 9.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| addon_watch-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.2 kB
Release files / addon_watch-0.1.0.tar.gz
| Download URL | addon_watch-0.1.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
715528030adbf5e118fd849822ce4ae6f6f4133781c2bd3cb864b7f25cad385d
|
|
BLAKE2b-256 checksum How to use checksums |
6292e6aa4888d6b768e98a10b270a02419384cf9164584446e660ca59c6460a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / addon_watch-0.1.0-py3-none-any.whl
| Download URL | addon_watch-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6fb0122560a6507e461f87dd8db2f8e88a3096ced935d2b0604c735b707fd61
|
|
BLAKE2b-256 checksum How to use checksums |
d6229f9d0b025204663060c000f0126099b6c25aa766720f25a94ffc61b667cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logSecurity for addon-watch 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for addon_watch-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.