From 8141e878feee71651391b58312d103dd93d92bf7 Mon Sep 17 00:00:00 2001 From: Antoine Prieels Date: Mon, 7 Sep 2020 11:17:19 +0000 Subject: [PATCH] [FIX] point_of_sale: IoT Box load all modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In 841c016913a87133bf7257c62ae5f6bf7d99e06d, we've removed the `hw_proxy` module and therefore removed it from the server wide modules loaded when starting Odoo. When the IoT Box was connected to a v12 or v13, the branch running on the box was checked-out to the corresponding version, restoring the `hw_proxy` module. The `hw_proxy` module was never loaded and some routes were not defined. To avoid this problem without leaving an empty `hw_proxy` module in master, we detect all modules in odoo/addons and load them. closes odoo/odoo#57501 X-original-commit: 7ac77931c4e663b44ef80f73933cf2573060c6fe Signed-off-by: Quentin Lejeune (qle) Signed-off-by: Antoine Prieƫls --- .../tools/posbox/overwrite_before_init/etc/init.d/odoo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init.d/odoo b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init.d/odoo index 8c9559a477c..3fb1ddc45df 100755 --- a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init.d/odoo +++ b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init.d/odoo @@ -20,6 +20,7 @@ DESC=odoo CONFIG=/home/pi/odoo/addons/point_of_sale/tools/posbox/configuration/odoo.conf LOGFILE=/var/log/odoo/odoo-server.log PIDFILE=/var/run/${NAME}.pid +MODULES=$(ls /home/pi/odoo/addons/ -m | tr -d ' ') USER=pi test -x $DAEMON || exit 0 @@ -31,7 +32,7 @@ function _start() { while ! test -a /run/systemd/timesync/synchronized && ! ip route | grep 10.11.12.1 && ((cnt--)); do sleep 1 done - start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --config $CONFIG --logfile $LOGFILE --load=web,hw_posbox_homepage,hw_escpos,hw_drivers --limit-time-cpu=600 --limit-time-real=1200 + start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --config $CONFIG --logfile $LOGFILE --load=$MODULES --limit-time-cpu=600 --limit-time-real=1200 } function _stop() {