[FIX] iot: Fix support of device with protocol 0

The self don't contain 'interface_protocol'.
The 'interface_protocol' is in self.dev because we add this in 'supported' function.

closes odoo/odoo#40132

X-original-commit: 6963a016385c4310dd547ae2d0d7e1d5cb4fab67
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit is contained in:
lejeune quentin
2019-11-12 14:09:07 +00:00
committed by fw-bot
parent e83e24b40d
commit 3942308bc4
@@ -51,7 +51,7 @@ class KeyboardUSBDriver(Driver):
if (self.dev.idVendor == device.info.vendor) and (self.dev.idProduct == device.info.product):
self.input_device = device
if 'barcode' in self._device_name.lower() or 'scanner' in self._device_name.lower() or self.interface_protocol == '0':
if 'barcode' in self._device_name.lower() or 'scanner' in self._device_name.lower() or self.dev.interface_protocol == '0':
self._device_type = 'scanner'
self._barcodes = Queue()
self._current_barcode = ''