[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) <qle@odoo.com>
This commit is contained in:
lejeune quentin
2023-01-02 19:38:44 +01:00
parent 2a32cdc3cf
commit cf63e07263
@@ -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)