From 4045e4fe66fc18f3e223a99c781a08a17ee49f60 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Tue, 29 May 2018 16:42:16 +0200 Subject: [PATCH] [FIX] hw_escpos: complying to barcode method A Have a XMLReceipt with the line: 123456789 Print the receipt. Before this commit, jibbrish characters were printed and also kinda 'broke' the spacing between commands e.g. If you add an EAN13 barcode below the code39 it would have failed to print correctly too After this commit, everything prints correctly OPW 1849284 ref: https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=128 closes #24965 --- addons/hw_escpos/escpos/escpos.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/hw_escpos/escpos/escpos.py b/addons/hw_escpos/escpos/escpos.py index 4051e65066c..6c93724aedd 100644 --- a/addons/hw_escpos/escpos/escpos.py +++ b/addons/hw_escpos/escpos/escpos.py @@ -522,6 +522,10 @@ class Escpos: # Print Code if code: self._raw(code) + # We are using type A commands + # So we need to add the 'NULL' character + # https://github.com/python-escpos/python-escpos/pull/98/files#diff-a0b1df12c7c67e38915adbe469051e2dR444 + self._raw('\x00') else: raise exception.BarcodeCodeError()