Skip to content
Snippets Groups Projects
Commit c6a28b62 authored by Antoine Prieels's avatar Antoine Prieels
Browse files

[FIX] hw_drivers: Print status ESC/POS printers


The status ticket contains ESC/POS commands but was printed on all
printers connected in USB. Plugging a printer that doesn't support
ESC/POS resulted in undefined behaviors.

We now only print this status ticket on ESC/POS printers.

closes odoo/odoo#40923

Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
parent d729460f
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,7 @@ class PrinterDriver(Driver):
'reason': None,
}
self.send_status()
if 'direct' in self._device_connection:
if 'direct' in self._device_connection and 'CMD:ESC/POS;' in self.dev['device-id']:
self.print_status()
@classmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment