diff options
| author | pha-odoo <pha@odoo.com> | 2019-06-26 11:05:09 +0200 |
|---|---|---|
| committer | pha-odoo <pha@odoo.com> | 2019-07-17 08:02:13 +0200 |
| commit | c4aade63fd6056a56ae3525239f39f622112eaf5 (patch) | |
| tree | d9b2f3491acde461fa61c971508643a39785cf1c /addons/hw_posbox_homepage | |
| parent | a0fc2210e60a47ac17690c53323995f9753c5ff8 (diff) | |
[IMP] iot: add iot serial drivers
This commit adds a base serial and a base serial scale iot drivers,
as well as drivers extending them for the two previously supported scales
(ADAM EQUIPMENT AZEXTRA and TOLEDO 8217).
Since just adding the new drivers creates a race condition
between the old drivers and the new, the old drivers need to be removed.
The IoT scale drivers need to be backward compatible and compatible with the community version,
so client using an IoT box with those versions can still connect a scale to the PoS.
Task: 1892412
Diffstat (limited to 'addons/hw_posbox_homepage')
| -rw-r--r-- | addons/hw_posbox_homepage/controllers/main.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py index 538b6acbf42..36a22356327 100644 --- a/addons/hw_posbox_homepage/controllers/main.py +++ b/addons/hw_posbox_homepage/controllers/main.py @@ -90,13 +90,15 @@ class IoTboxHomepage(web.Home): pos_device = self.get_pos_device_status() iot_device = [] - for status in pos_device: - if pos_device[status]['status'] == 'connected': - iot_device.append({ - 'name': status, - 'type': 'device', - 'message': ' '.join(pos_device[status]['messages']) - }) + + 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({ |
