From aa18bcc14d2c9be939a9debcee441464274f27e2 Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Tue, 10 Sep 2019 13:00:42 +0000 Subject: [PATCH] [FIX] hw_posbox_homepage: Removes unnecessary POS devices Previously, we showed POS and IoT devices. Now all POS devices are converted to IoT devices. So the 'get_pos_devices_status' function is useless --- addons/hw_posbox_homepage/controllers/main.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py index 8a5ca64be87..0bfd7d06b28 100644 --- a/addons/hw_posbox_homepage/controllers/main.py +++ b/addons/hw_posbox_homepage/controllers/main.py @@ -49,12 +49,6 @@ list_credential_template = jinja_env.get_template('list_credential.html') class IoTboxHomepage(web.Home): - def get_pos_device_status(self): - statuses = {} - for driver in hw_proxy.drivers: - statuses[driver] = hw_proxy.drivers[driver].get_status() - return statuses - def get_six_terminal(self): terminal_id = helpers.read_file_first_line('odoo-six-payment-terminal.conf') return terminal_id or 'Not Configured' @@ -75,18 +69,7 @@ class IoTboxHomepage(web.Home): else: network = 'Not Connected' - pos_device = self.get_pos_device_status() iot_device = [] - - if not iot_devices: - for status in pos_device: - if pos_device[status]['status'] == 'connected': - iot_device.append({ - 'name': status, - 'type': 'device', - 'message': ' '.join(pos_device[status]['messages']) - }) - for device in iot_devices: iot_device.append({ 'name': iot_devices[device].device_name + ' : ' + str(iot_devices[device].data['value']),