From 672323037a4e4b63d2c5b579b1b52a2ae0155af3 Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Thu, 23 Apr 2020 10:47:45 +0000 Subject: [PATCH] [FIX] hw_drivers: Clean drivers folder before change branch When we change the version of branch we keep drivers. But drivers are not compatible with all branch and Odoo on the IoT Box can't start. So we remove all drivers before checkout on another branch closes odoo/odoo#50140 X-original-commit: 4e97aec6717697c742e5e0b09f00ab7dec09712f Signed-off-by: pimodoo --- addons/hw_drivers/tools/helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hw_drivers/tools/helpers.py b/addons/hw_drivers/tools/helpers.py index 0be09086e4d..0020cff2a4b 100644 --- a/addons/hw_drivers/tools/helpers.py +++ b/addons/hw_drivers/tools/helpers.py @@ -79,6 +79,7 @@ def check_git_branch(): if db_branch != local_branch: subprocess.check_call(["sudo", "mount", "-o", "remount,rw", "/"]) + subprocess.check_call(["rm", "/home/pi/odoo/addons/hw_drivers/drivers/*"]) subprocess.check_call(git + ['branch', '-m', db_branch]) subprocess.check_call(git + ['remote', 'set-branches', 'origin', db_branch]) os.system('/home/pi/odoo/addons/point_of_sale/tools/posbox/configuration/posbox_update.sh')