From ef09a4f44e40c4d0d7242695d76e813be178bdc0 Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Mon, 9 Dec 2019 12:47:54 +0000 Subject: [PATCH] [FIX] hw_drivers: Fix printer unknow in PrinterDriver We add a condition to add printer. Printer, for protocol DNSSD and LPD, must have a "model" closes odoo/odoo#41591 X-original-commit: a07f118fc7182fa96344fad4a0164ed86c446352 Signed-off-by: Quentin Lejeune (qle) --- addons/hw_drivers/drivers/PrinterDriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hw_drivers/drivers/PrinterDriver.py b/addons/hw_drivers/drivers/PrinterDriver.py index daca2f5fa18..72919dd4cf0 100644 --- a/addons/hw_drivers/drivers/PrinterDriver.py +++ b/addons/hw_drivers/drivers/PrinterDriver.py @@ -93,7 +93,7 @@ class PrinterDriver(Driver): @classmethod def supported(cls, device): protocol = ['dnssd', 'lpd'] - if any(x in device['url'] for x in protocol) or 'direct' in device['device-class']: + if any(x in device['url'] for x in protocol) and device['device-make-and-model'] != 'Unknown' or 'direct' in device['device-class']: model = cls.get_device_model(device) ppdFile = '' for ppd in PPDs: