From cf63e07263ede453eecf8dc5a21276d0892bd4e0 Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Fri, 30 Dec 2022 14:15:17 +0000 Subject: [PATCH] [FIX] hw_drivers: do not rename IoT in Windows If we use the token to connect a IoT in Windows We execute the file rename_iot.sh So with this commit we give the ability to rename the IoT only in Linux (with a raspberry) closes odoo/odoo#108922 X-original-commit: a2bf3c7576f63eb037440c7bf076f5c0b50109d8 Signed-off-by: Quentin Lejeune (qle) --- addons/hw_posbox_homepage/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py index 9df22d675a9..2a3ea05dec1 100644 --- a/addons/hw_posbox_homepage/controllers/main.py +++ b/addons/hw_posbox_homepage/controllers/main.py @@ -211,7 +211,7 @@ class IoTboxHomepage(Home): else: url = helpers.get_odoo_server_url() token = helpers.get_token() - if iotname: + if iotname and platform.system() == 'Linux': subprocess.check_call([get_resource_path('point_of_sale', 'tools/posbox/configuration/rename_iot.sh'), iotname]) else: helpers.odoo_restart(3)