From 841c016913a87133bf7257c62ae5f6bf7d99e06d Mon Sep 17 00:00:00 2001 From: Antoine Prieels Date: Thu, 14 May 2020 07:45:07 +0000 Subject: [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 --- doc/reference/iot.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc/reference') diff --git a/doc/reference/iot.rst b/doc/reference/iot.rst index dab76995e0f..2a7e8d66eb1 100644 --- a/doc/reference/iot.rst +++ b/doc/reference/iot.rst @@ -61,7 +61,7 @@ determined connection type. Creating a new interface requires .. code-block:: python - from odoo.addons.hw_drivers.controllers.driver import Interface + from odoo.addons.hw_drivers.interface import Interface class InterfaceName(Interface): connection_type = 'ConnectionType' @@ -96,16 +96,16 @@ Creating a new Driver requires: .. code-block:: python - from odoo.addons.hw_drivers.controllers.driver import Driver + from odoo.addons.hw_drivers.driver import Driver class DriverName(Driver): connection_type = 'ConnectionType' - def __init__(self, device): - super(NewDriver, self).__init__(device) - self._device_type = 'DeviceType' - self._device_connection = 'DeviceConnection' - self._device_name = 'DeviceName' + def __init__(self, identifier, device): + super(NewDriver, self).__init__(identifier, device) + self.device_type = 'DeviceType' + self.device_connection = 'DeviceConnection' + self.device_name = 'DeviceName' @classmethod def supported(cls, device): @@ -128,7 +128,7 @@ instantiated using the IP of the IoT Box and the device identifier. .. code-block:: javascript - var DeviceProxy = require('iot.widgets').DeviceProxy; + var DeviceProxy = require('iot.DeviceProxy'); var iot_device = new DeviceProxy({ iot_ip: iot_ip, @@ -182,7 +182,7 @@ with `self.data` as argument. .. code-block:: python - from odoo.addons.hw_drivers.controllers.driver import event_manager + from odoo.addons.hw_drivers.event_manager import event_manager class DriverName(Driver): connection_type = 'ConnectionType' -- cgit v1.2.3