From aa6474801c055e3030253fa89f6c15b6a28fecc6 Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Thu, 5 Dec 2019 11:09:31 +0000 Subject: [PATCH] [FIX] point_of_sale: Fix access point for IoT Box When the box is in "access point" it calls the function 'get_wifi_essid' at every ping => ~ 3 seconds. So after a few moments the network card blocks and turns off. Now we redirect the user to the '/steps' route that only executes the function once. closes odoo/odoo#41415 X-original-commit: b5020a4471666cb53398077db4e856d1c60245a9 Signed-off-by: Quentin Lejeune (qle) --- addons/hw_posbox_homepage/controllers/main.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py index 0a940f3861f..d60a7201211 100644 --- a/addons/hw_posbox_homepage/controllers/main.py +++ b/addons/hw_posbox_homepage/controllers/main.py @@ -93,14 +93,7 @@ class IoTboxHomepage(web.Home): wifi = Path.home() / 'wifi_network.txt' remote_server = Path.home() / 'odoo-remote-server.conf' if (wifi.exists() == False or remote_server.exists() == False) and helpers.access_point(): - return configure_wizard_template.render({ - 'title': 'Configure IoT Box', - 'breadcrumb': 'Configure IoT Box', - 'loading_message': 'Configuring your IoT Box', - 'ssid': helpers.get_wifi_essid(), - 'server': helpers.get_odoo_server_url(), - 'hostname': subprocess.check_output('hostname').decode('utf-8'), - }) + return "" else: return homepage_template.render(self.get_homepage_data())