mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user