Commit Graph
4 Commits
Author SHA1 Message Date
lejeune quentin cb4337ebc7 [FIX] hw_drivers: Fix default for action on iot mapping
Some requests are sended without specific action.
So we need set these call to fit to a default action
who is a empty string.

Pull requeste related: 63375

closes odoo/odoo#67089

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-03-02 15:32:41 +00:00
lejeune quentin 2be28bfbde [IMP] hw_drivers: Map drivers actions
Add possibilities to map actions for the drivers

To avoid a sequence of "if elif else" we integrate a '_actions()' dictionary
where the key is the name of the action and the value is
the name of the function to be executed in the drivers
with the action data as a parameter

closes odoo/odoo#63375

Related: odoo/enterprise#15310
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-16 15:52:34 +00:00
Antoine Prieels a7bbcd1360 hw_drivers: Stop devices threads on disconnect
The threads of devices were still running after `disconnect` had been
called. We add a `_stopped` flag that is set when the thread should be
stopped.

closes odoo/odoo#56500

X-original-commit: 639a4e4fc72567a9655599eef150fabefaf1ff2e
Related: odoo/enterprise#12651
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-08-25 11:24:56 +00:00
Antoine Prieels 72681dc53f [IMP] hw_*,point_of_sale: Cleaning IoT Box
- Split driver.py to multiple files
- Remove hw_proxy module as most of its routes were not used and
  move remaingin routes to a controller in hw_drivers
- Add missing coding and license lines at the beginning of files
- Reorder imports and remove unused ones
- Rename device_id to device_identifier for clarity
- Rename screen to display for consistency
- Other minors improvements

Taskid: 1973956
X-original-commit: 841c016913a87133bf7257c62ae5f6bf7d99e06d
2020-08-25 11:24:56 +00:00