[FIX] printer_zpl2: QR as bytes

This commit is contained in:
Enric Tobella
2019-03-12 13:50:51 +01:00
committed by duongtq
parent 60293ad51d
commit c57f2d68cd
2 changed files with 2 additions and 2 deletions

View File

@@ -199,7 +199,7 @@ class PrintingLabelZpl2(models.Model):
else:
if component.component_type == zpl2.BARCODE_QR_CODE:
# Adding Control Arguments to QRCode data Label
data = 'MM,A{}'.format(data)
data = '{}A,{}'.format(component.error_correction, data)
barcode_arguments = dict([
(field_name, component[field_name])

View File

@@ -1002,7 +1002,7 @@ class TestPrintingLabelZpl2(TransactionCase):
# Component format
'^BQN,2,1,Q,7'
# Component contents
'^FDMM,A{contents}'
'^FDQA,{contents}'
# Component end
'^FS\n'
# Recall last saved parameters