Skip to content
Snippets Groups Projects
Commit b5020a44 authored by lejeune quentin's avatar lejeune quentin
Browse files

[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#41397

Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
parent 4dffb76f
No related branches found
No related tags found
No related merge requests found
......@@ -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 "<meta http-equiv='refresh' content='0; url=http://" + helpers.get_ip() + ":8069/steps'>"
else:
return homepage_template.render(self.get_homepage_data())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment