mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[FIX] printer_zpl2: QR as bytes
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Printer ZPL II',
|
'name': 'Printer ZPL II',
|
||||||
'version': '11.0.1.0.0',
|
'version': '11.0.1.0.1',
|
||||||
'category': 'Printer',
|
'category': 'Printer',
|
||||||
'author': 'SYLEAM, Apertoso NV, Odoo Community Association (OCA)',
|
'author': 'SYLEAM, Apertoso NV, Odoo Community Association (OCA)',
|
||||||
'website': 'http://www.syleam.fr/',
|
'website': 'http://www.syleam.fr/',
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ class PrintingLabelZpl2(models.Model):
|
|||||||
else:
|
else:
|
||||||
if component.component_type == zpl2.BARCODE_QR_CODE:
|
if component.component_type == zpl2.BARCODE_QR_CODE:
|
||||||
# Adding Control Arguments to QRCode data Label
|
# Adding Control Arguments to QRCode data Label
|
||||||
data = 'MM,A{}'.format(data)
|
data = '{}A,{}'.format(component.error_correction, data)
|
||||||
|
|
||||||
barcode_arguments = dict([
|
barcode_arguments = dict([
|
||||||
(field_name, component[field_name])
|
(field_name, component[field_name])
|
||||||
|
|||||||
@@ -1002,7 +1002,7 @@ class TestPrintingLabelZpl2(TransactionCase):
|
|||||||
# Component format
|
# Component format
|
||||||
'^BQN,2,1,Q,7'
|
'^BQN,2,1,Q,7'
|
||||||
# Component contents
|
# Component contents
|
||||||
'^FDMM,A{contents}'
|
'^FDQA,{contents}'
|
||||||
# Component end
|
# Component end
|
||||||
'^FS\n'
|
'^FS\n'
|
||||||
# Recall last saved parameters
|
# Recall last saved parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user