TIP: You can type at any time to perform a new search.
Printer ZPL II
printer_zpl2 · OCA/report-print-send
- Repository
- OCA/report-print-send · module folder · Try on Runboat
- Module version
- 1.0.2
- Category
- Printer
- Folder size
- 1.02 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/report-print-send
- Last tracking update
- 2026-08-07 08:42:48
- Authors
- Odoo Community Association (OCA), Apertoso NV, SUBTENO-IT, FLorent de Labarre
- Maintainers
- Odoo Community Association (OCA), Apertoso NV, SUBTENO-IT, FLorent de Labarre
- Committers
- Carlos Lopez, Vincent Van Rossem, Weblate, OCA-git-bot, oca-ci, arantxa-s73
- Odoo dependencies
- Python dependencies
- pycups
- System dependencies
- None
- Required by
- None
- Description
This module extends the **Report to printer** (`base_report_to_printer`) module to add a ZPL II label printing feature. This module is meant to be used as a base for module development, and does not provide a GUI on its own. See below for more details.
Code Analysis ⓘ
Views touched (5)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_printing_label_zpl2_form |
printing.label.zpl2 | form | New | |
view_printing_label_zpl2_list |
printing.label.zpl2 | list | New | |
view_printing_label_zpl2_search |
printing.label.zpl2 | search | New | |
view_wizard_import_zpl2_form |
wizard.import.zpl2.form | wizard.import.zpl2 | form | New |
view_wizard_print_product_label_form |
wizard.print.record.label.form | wizard.print.record.label | form | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (5)
New fields (19)
-
action_window_idMany2one → ir.actions.act_windowcomodel_name='ir.actions.act_window'readonly=Truestring='Action' -
activeBooleandefault=True -
component_idsOne2many → printing.label.zpl2.componentcomodel_name='printing.label.zpl2.component'copy=Truehelp='Components which will be printed on the label.'inverse_name='label_id'string='Label Components' -
descriptionCharhelp='Long description for this label.' -
extraTextdefault='{}' -
labelary_dpmmSelectiondefault='8dpmm'required=Trueselection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')]string='Print density' -
labelary_heightFloatdefault=70string='Height in mm' -
labelary_imageBinarycompute='_compute_labelary_image'string='Image from Labelary' -
labelary_widthFloatdefault=140string='Width in mm' -
model_idMany2one → ir.modelcomodel_name='ir.model'help='Model used to print this label.'ondelete='cascade'required=Truestring='Model' -
nameCharhelp='Label Name.'required=True -
origin_xIntegerdefault=10help='Origin point of the contents in the label, X coordinate.'required=True -
origin_yIntegerdefault=10help='Origin point of the contents in the label, Y coordinate.'required=True -
printer_idMany2one → printing.printercomodel_name='printing.printer'string='Printer' -
record_idIntegerdefault=1string='Record ID' -
restore_saved_configBooleandefault=Truehelp="Restore printer's saved configuration and end of each label "string="Restore printer's configuration" -
test_labelary_modeBooleanstring='Mode Labelary' -
test_print_modeBooleanstring='Mode Print' -
widthIntegerdefault=480help='Width of the label, will be set on the printer before printing.'required=True
-
add_action(self, model_id)@api.model -
check_recursion(self)@api.constrains('component_ids') -
create_action(self) -
import_zpl2(self) -
new_action(self, model_id)@api.model -
print_label(self, printer, record, page_count=1, **extra) -
print_test_label(self) -
unlink_action(self)
New fields (45)
-
bar_width_ratioFloatdefault=3.0help='Ratio between wide bar and narrow bar.' -
block_justifySelectiondefault='L'help='Choose how the text will be justified in the block.'required=Trueselection=[(str(zpl2.JUSTIFY_LEFT), 'Left'), (str(zpl2.JUSTIFY_CENTER), 'Center'), (str(zpl2.JUSTIFY_JUSTIFIED), 'Justified'), (str(zpl2.JUSTIFY_RIGHT), 'Right')]string='Justify' -
block_left_marginIntegerhelp='Left margin for the second and other lines in the block.'string='Left Margin' -
block_linesIntegerdefault=1help='Maximum number of lines to print in the block.' -
block_spacesIntegerhelp='Number of spaces added between lines in the block.' -
block_widthIntegerhelp='Width of the block.' -
check_digitsBooleanhelp='Check if you want to compute and print the check digit.' -
colorSelectiondefault=str(zpl2.COLOR_BLACK)help='Color of the line to draw.'selection=[(str(zpl2.COLOR_BLACK), 'Black'), (str(zpl2.COLOR_WHITE), 'White')] -
columns_countIntegerhelp='Number of data columns to encode.' -
component_typeSelectiondefault='text'help='Type of content, simple text or barcode.'required=Trueselection=[('text', 'Text'), ('rectangle', 'Rectangle / Line'), ('diagonal', 'Diagonal Line'), ('circle', 'Circle'), ('graphic', 'Graphic'), (str(zpl2.BARCODE_CODE_11), 'Code 11'), (str(zpl2.BARCODE_INTERLEAVED_2_OF_5), 'Interleaved 2 of 5'), (str(zpl2.BARCODE_CODE_39), 'Code 39'), (str(zpl2.BARCODE_CODE_49), 'Code 49'), (str(zpl2.BARCODE_PDF417), 'PDF417'), (str(zpl2.BARCODE_EAN_8), 'EAN-8'), (str(zpl2.BARCODE_UPC_E), 'UPC-E'), (str(zpl2.BARCODE_CODE_128), 'Code 128'), (str(zpl2.BARCODE_EAN_13), 'EAN-13'), (str(zpl2.BARCODE_QR_CODE), 'QR Code'), ('sublabel', 'Sublabel'), ('zpl2_raw', 'ZPL2')]string='Type' -
dataTextdefault=<expr>help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.'required=True -
data_autofillBooleanhelp="Change 'data' with dictionary of the object information."string='Autofill Data' -
diagonal_orientationSelectiondefault=str(zpl2.DIAGONAL_ORIENTATION_LEFT)help='Orientation of the diagonal line.'selection=[(str(zpl2.DIAGONAL_ORIENTATION_LEFT), 'Left (\\)'), (str(zpl2.DIAGONAL_ORIENTATION_RIGHT), 'Right (/)')] -
error_correctionSelectiondefault=str(zpl2.ERROR_CORRECTION_HIGH)help='Error correction for some barcode types like QR Code.'required=Trueselection=[(str(zpl2.ERROR_CORRECTION_ULTRA_HIGH), 'Ultra-high Reliability Level'), (str(zpl2.ERROR_CORRECTION_HIGH), 'High Reliability Level'), (str(zpl2.ERROR_CORRECTION_STANDARD), 'Standard Level'), (str(zpl2.ERROR_CORRECTION_HIGH_DENSITY), 'High Density Level')] -
fontSelectiondefault=str(zpl2.FONT_DEFAULT)help='Font to use, for text only.'required=Trueselection=[(str(zpl2.FONT_DEFAULT), 'Default'), (str(zpl2.FONT_9X5), '9x5'), (str(zpl2.FONT_11X7), '11x7'), (str(zpl2.FONT_18X10), '18x10'), (str(zpl2.FONT_28X15), '28x15'), (str(zpl2.FONT_26X13), '26x13'), (str(zpl2.FONT_60X40), '60x40'), (str(zpl2.FONT_21X13), '21x13')] -
graphic_imageBinaryattachment=Truehelp='This field holds a static image to print. If not set, the data field is evaluated.'string='Image' -
heightIntegerhelp='Height of the printed component. For a text component, height of a single character.' -
in_blockBooleanhelp='If checked, the data will be restrected in a defined block on the label.' -
interpretation_lineBooleanhelp='Check if you want the interpretation line to be printed.' -
interpretation_line_aboveBooleanhelp='Check if you want the interpretation line to be printed above the barcode.' -
label_idMany2one → printing.label.zpl2comodel_name='printing.label.zpl2'help='Label using this component.'ondelete='cascade'required=Truestring='Label' -
magnification_factorIntegerdefault=1help='Magnification Factor, from 1 to 10.' -
mask_valueIntegerdefault=7help='Mask Value, from 0 to 7.' -
modelSelectiondefault=str(zpl2.MODEL_ENHANCED)help='Barcode model, used by some barcode types like QR Code.'selection=[(str(zpl2.MODEL_ORIGINAL), 'Original'), (str(zpl2.MODEL_ENHANCED), 'Enhanced')] -
model_idMany2one → ir.modelcomodel_name='ir.model'compute='_compute_model_id'string="Record's model" -
module_widthIntegerdefault=2help='Module width for the barcode.' -
nameCharhelp='Name of the component.'required=True -
only_product_barcodeBooleanargs: 'Only product barcode data' -
orientationSelectiondefault=str(zpl2.ORIENTATION_NORMAL)help='Orientation of the barcode.'required=Trueselection=[(str(zpl2.ORIENTATION_NORMAL), 'Normal'), (str(zpl2.ORIENTATION_ROTATED), 'Rotated'), (str(zpl2.ORIENTATION_INVERTED), 'Inverted'), (str(zpl2.ORIENTATION_BOTTOM_UP), 'Read from Bottom up')] -
origin_xIntegerdefault=10help='Origin point of the component in the label, X coordinate.'required=True -
origin_yIntegerdefault=10help='Origin point of the component in the label, Y coordinate.'required=True -
repeatBooleanhelp='Check this box to repeat this component on the label.'string='Repeatable' -
repeat_countIntegerdefault=1help='Maximum count of repeats of the component.' -
repeat_offsetIntegerdefault=0help='Number of elements to skip when reading a list of elements.' -
repeat_offset_xIntegerhelp='X coordinate offset between each occurence of this component on the label.' -
repeat_offset_yIntegerhelp='Y coordinate offset between each occurence of this component on the label.' -
reverse_printBooleanhelp='If checked, the data will be printed in the inverse color of the background.' -
roundingIntegerhelp='Rounding of the printed rectangle corners.' -
rows_countIntegerhelp='Number of rows to encode.' -
security_levelIntegerhelp='Security level for error detection.' -
sequenceIntegerhelp='Order used to print the elements.' -
sublabel_idMany2one → printing.label.zpl2comodel_name='printing.label.zpl2'help='Another label to include into this one as a component. This allows to define reusable labels parts.'string='Sublabel' -
thicknessIntegerhelp='Thickness of the line to draw.' -
truncateBooleanhelp='Check if you want to truncate the barcode.' -
widthIntegerhelp='Width of the printed component. For a text component, width of a single character.'
-
action_minus_origin_x(self) -
action_minus_origin_y(self) -
action_plus_origin_x(self) -
action_plus_origin_y(self) -
autofill_data(self, record, eval_args)@api.model -
process_model(self, model)
New fields (3)
-
dataTexthelp='Printer used to print the labels.'required=True -
delete_componentBooleandefault=Falsestring='Delete existing components' -
label_idMany2one → printing.label.zpl2comodel_name='printing.label.zpl2'readonly=Truerequired=Truestring='Label'
-
import_zpl2(self)
New fields (5)
-
active_model_idMany2one → ir.modelcomodel_name='ir.model'domain=<expr>string='Model' -
label_idMany2one → printing.label.zpl2comodel_name='printing.label.zpl2'domain=<expr>help='Label to print.'required=Truestring='Label' -
line_idsOne2many → wizard.print.record.label.lineargs: 'wizard.print.record.label.line', 'label_header_id' -
modelCharrelated='active_model_id.model'string='Model Name' -
printer_idMany2one → printing.printercomodel_name='printing.printer'help='Printer used to print the labels.'required=Truestring='Printer'
-
default_get(self, fields_list)@api.model -
print_label(self)Prints a label per selected record
New fields (2)
-
label_header_idMany2one → wizard.print.record.labelcomodel_name='wizard.print.record.label' -
label_noIntegerstring='# labels'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
- Status
- Open migration PR — not merged yet for this version
- CI status
- green — ready to merge
- Open since
- 52 days ago
- Last activity
- 45 days ago
- Repository
- OCA/report-print-send
- Pull request
- [19.0][MIG] printer_zpl2 (#466)