allow to avoid 'Recall last saved values' command

This command causes Godex printers in GZPL emulation not to
print the label, this might be a firmware bug
(tested on G500 Z1.00E )

OCA Transbot updated translations from Transifex
This commit is contained in:
Jos De Graeve
2017-06-14 11:44:54 +02:00
committed by mreficent
parent 8bdee9d869
commit 0a386e1c66
3 changed files with 730 additions and 1 deletions

View File

@@ -39,6 +39,10 @@ class PrintingLabelZpl2(models.Model):
comodel_name='printing.label.zpl2.component', inverse_name='label_id',
string='Label Components',
help='Components which will be printed on the label.')
restore_saved_config = fields.Boolean(
string="Restore printer's configuration",
help="Restore printer's saved configuration and end of each label ",
default=True)
@api.multi
def _generate_zpl2_components_data(
@@ -167,7 +171,8 @@ class PrintingLabelZpl2(models.Model):
page_count=page_count)
# Restore printer's configuration and end the label
label_data.configuration_update(zpl2.CONF_RECALL_LAST_SAVED)
if self.restore_saved_config:
label_data.configuration_update(zpl2.CONF_RECALL_LAST_SAVED)
label_data.label_end()
return label_data.output()