[FIX] odoo20: install inotify package for --dev=reload autoreload
Odoo 20's requirements.txt no longer ships the inotify python package, so --dev=reload logged "'inotify' module not installed. Code autoreload feature is disabled" and never restarted on file edits — breaking the core promise of this blueprint (live edits auto-apply). The init script now pip-installs inotify unconditionally after the requirements install (cheap no-op when already present).
This commit is contained in:
1 parent
b2e1d1d3d5
commit
6254f04fe7
4 files changed
+25
No files matched your search
@@ -116,6 +116,10 @@ def build_init_script() -> str:
|
||||
defaults `http_interface` to 127.0.0.1 AND force-resets it to
|
||||
127.0.0.1 when empty, so without the explicit line Odoo binds
|
||||
loopback only and Traefik/VIP connections are refused (502).
|
||||
* CRITICAL FIX #5 (Odoo 20): install the `inotify` python package.
|
||||
Odoo 20's requirements.txt no longer ships it, but `--dev=reload`
|
||||
requires it — without it odoo logs "'inotify' module not installed.
|
||||
Code autoreload feature is disabled" and NEVER restarts on edits.
|
||||
"""
|
||||
return textwrap.dedent(r"""
|
||||
#!/bin/bash
|
||||
@@ -154,6 +158,12 @@ def build_init_script() -> str:
|
||||
echo "[init] Odoo already installed; skipping pip install."
|
||||
fi
|
||||
|
||||
# Odoo 20: requirements.txt no longer ships the inotify package, but
|
||||
# --dev=reload needs it ("'inotify' module not installed. Code autoreload
|
||||
# feature is disabled"). Install unconditionally (cheap if present).
|
||||
pip install --quiet --no-cache-dir --break-system-packages inotify \
|
||||
|| echo "[init] WARN: inotify install failed (autoreload disabled)"
|
||||
|
||||
mkdir -p /etc/odoo /var/lib/odoo /var/log/odoo
|
||||
cat > /etc/odoo/odoo.conf <<EOF
|
||||
[options]
|
||||
|
||||
Reference in new issue
Block a user