From e427d0a2147896aa4311488ebc13f45b84cb330c Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Mon, 12 Dec 2022 15:07:52 +0000 Subject: [PATCH] [FIX] hw_drivers: In IoT adapt path to filename From the commit 2ab231bd7af609a751ed8168cc094dfeb1012eda We introduce a error in the path to read Linux file In this commit we correct the access to the file which is in the "home" of the raspberry closes odoo/odoo#107762 Signed-off-by: Quentin Lejeune (qle) --- addons/hw_drivers/tools/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hw_drivers/tools/helpers.py b/addons/hw_drivers/tools/helpers.py index 7b11d62f71793..d2e724ab05a59 100644 --- a/addons/hw_drivers/tools/helpers.py +++ b/addons/hw_drivers/tools/helpers.py @@ -309,7 +309,7 @@ def odoo_restart(delay): def path_file(filename): platform_os = platform.system() if platform_os == 'Linux': - return Path().absolute().parent.joinpath(filename) + return Path.home() / filename elif platform_os == 'Windows': return Path().absolute().parent.joinpath('server/' + filename)