[FIX] point_of_sale: IoT Box load all modules

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) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
This commit is contained in:
Antoine Prieels
2020-09-11 10:33:03 +00:00
parent a33190d831
commit 8141e878fe
@@ -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() {