[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) <qle@odoo.com>
This commit is contained in:
lejeune quentin
2019-12-09 12:47:59 +00:00
parent 6b9197244e
commit ef09a4f44e
+1 -1
View File
@@ -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: