Added graphic image support

This commit is contained in:
Jos De Graeve
2017-11-02 10:04:25 +01:00
committed by Nils Hamerlinck
parent 4ff66113a9
commit 75c3ae6fd1
5 changed files with 36 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ class PrintingLabelZpl2Component(models.Model):
('text', 'Text'),
('rectangle', 'Rectangle / Line'),
('circle', 'Circle'),
('graphic', 'Graphic'),
(zpl2.BARCODE_CODE_11, 'Code 11'),
(zpl2.BARCODE_INTERLEAVED_2_OF_5, 'Interleaved 2 of 5'),
(zpl2.BARCODE_CODE_39, 'Code 39'),
@@ -142,3 +143,7 @@ class PrintingLabelZpl2Component(models.Model):
block_left_margin = fields.Integer(
string='Left Margin',
help='Left margin for the second and other lines in the block.')
graphic_image = fields.Binary(
string='Image', attachment=True,
help='This field holds a static image to print. '
'If not set, the data field is evaluated.')