summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorAntoine Prieels <anp@odoo.com>2020-05-14 07:45:07 +0000
committerAntoine Prieels <anp@odoo.com>2020-08-25 06:19:38 +0000
commit841c016913a87133bf7257c62ae5f6bf7d99e06d (patch)
treeb0ed83f8b440e9920ec32c4dd48818847c4725d6 /doc/reference
parent6bc4b4178c8033f19f1ed3d7ba22f777ac9b0788 (diff)
[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
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/iot.rst18
1 files changed, 9 insertions, 9 deletions
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'