diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2018-05-29 16:42:16 +0200 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2018-05-30 14:05:26 +0200 |
| commit | 1ad3d1847e48ded7aafd8e3b9bf2ca7458abcc59 (patch) | |
| tree | 076ecc94ecff358d5ec38a111ec21ed195f7e4a7 /addons | |
| parent | ea0fcd52d923d4dfaf87ad1cc0ce6d3e32c16477 (diff) | |
[FIX] hw_escpos: complying to barcode method A
Have a XMLReceipt with the line:
<barcode encoding="CODE39">123456789</barcode>
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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hw_escpos/escpos/escpos.py | 4 |
1 files changed, 4 insertions, 0 deletions
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() |
