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 )
This commit is contained in:
committed by
Sylvain GARANCHER
parent
b0ac90b8e8
commit
5b08b4caf4
@@ -39,6 +39,10 @@ class PrintingLabelZpl2(models.Model):
|
|||||||
comodel_name='printing.label.zpl2.component', inverse_name='label_id',
|
comodel_name='printing.label.zpl2.component', inverse_name='label_id',
|
||||||
string='Label Components',
|
string='Label Components',
|
||||||
help='Components which will be printed on the label.')
|
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
|
@api.multi
|
||||||
def _generate_zpl2_components_data(
|
def _generate_zpl2_components_data(
|
||||||
@@ -167,6 +171,7 @@ class PrintingLabelZpl2(models.Model):
|
|||||||
page_count=page_count)
|
page_count=page_count)
|
||||||
|
|
||||||
# Restore printer's configuration and end the label
|
# Restore printer's configuration and end the label
|
||||||
|
if self.restore_saved_config:
|
||||||
label_data.configuration_update(zpl2.CONF_RECALL_LAST_SAVED)
|
label_data.configuration_update(zpl2.CONF_RECALL_LAST_SAVED)
|
||||||
label_data.label_end()
|
label_data.label_end()
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
<field name="width"/>
|
<field name="width"/>
|
||||||
<field name="origin_x"/>
|
<field name="origin_x"/>
|
||||||
<field name="origin_y"/>
|
<field name="origin_y"/>
|
||||||
|
<field name="restore_saved_config"/>
|
||||||
</group>
|
</group>
|
||||||
<field name="component_ids" nolabel="1" colspan="4">
|
<field name="component_ids" nolabel="1" colspan="4">
|
||||||
<tree string="Label Component">
|
<tree string="Label Component">
|
||||||
|
|||||||
Reference in New Issue
Block a user