Printer ZPL II

printer_zpl2
REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/18.0/printer_zpl2
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
COMMITTERS
COMMITTERSCarlos Lopez, Weblate, OCA-git-bot, oca-ci, Vincent Van Rossem, arantxa-s73
WEBSITE
WEBSITEhttps://github.com/OCA/report-print-send
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:19
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pycups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 IDNameModelTypeStatus
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
Models touched (5)

New fields (19)
  • action_window_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' readonly=True string='Action'
  • active Boolean
    default=True
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' copy=True help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • extra Text
    default='{}'
  • labelary_dpmm Selection
    default='8dpmm' required=True selection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')] string='Print density'
  • labelary_height Float
    default=70 string='Height in mm'
  • labelary_image Binary
    compute='_compute_labelary_image' string='Image from Labelary'
  • labelary_width Float
    default=140 string='Width in mm'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' ondelete='cascade' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • record_id Integer
    default=1 string='Record ID'
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • test_labelary_mode Boolean
    string='Mode Labelary'
  • test_print_mode Boolean
    string='Mode Print'
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (8)
  • 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_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(str(zpl2.JUSTIFY_LEFT), 'Left'), (str(zpl2.JUSTIFY_CENTER), 'Center'), (str(zpl2.JUSTIFY_JUSTIFIED), 'Justified'), (str(zpl2.JUSTIFY_RIGHT), 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=str(zpl2.COLOR_BLACK) help='Color of the line to draw.' selection=[(str(zpl2.COLOR_BLACK), 'Black'), (str(zpl2.COLOR_WHITE), 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' required=True selection=[('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'
  • data Text
    default=<expr> help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True
  • data_autofill Boolean
    help="Change 'data' with dictionary of the object information." string='Autofill Data'
  • diagonal_orientation Selection
    default=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_correction Selection
    default=str(zpl2.ERROR_CORRECTION_HIGH) help='Error correction for some barcode types like QR Code.' required=True selection=[(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')]
  • font Selection
    default=str(zpl2.FONT_DEFAULT) help='Font to use, for text only.' required=True selection=[(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_image Binary
    attachment=True help='This field holds a static image to print. If not set, the data field is evaluated.' string='Image'
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • magnification_factor Integer
    default=1 help='Magnification Factor, from 1 to 10.'
  • mask_value Integer
    default=7 help='Mask Value, from 0 to 7.'
  • model Selection
    default=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_id Many2one → ir.model
    comodel_name='ir.model' compute='_compute_model_id' string="Record's model"
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • only_product_barcode Boolean
    args: 'Only product barcode data'
  • orientation Selection
    default=str(zpl2.ORIENTATION_NORMAL) help='Orientation of the barcode.' required=True selection=[(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_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (6)
  • 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)
  • data Text
    help='Printer used to print the labels.' required=True
  • delete_component Boolean
    default=False string='Delete existing components'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' readonly=True required=True string='Label'
Public methods (1)
  • import_zpl2(self)

New fields (5)
  • active_model_id Many2one → ir.model
    comodel_name='ir.model' domain=<expr> string='Model'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • line_ids One2many → wizard.print.record.label.line
    args: 'wizard.print.record.label.line', 'label_header_id'
  • model Char
    related='active_model_id.model' string='Model Name'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    Prints a label per selected record

New fields (2)
  • label_header_id Many2one → wizard.print.record.label
    comodel_name='wizard.print.record.label'
  • label_no Integer
    string='# labels'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/17.0/printer_zpl2
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
COMMITTERS
COMMITTERSDonatas, Emanuel Cino, Weblate, OCA-git-bot, oca-ci, arantxa-s73
WEBSITE
WEBSITEhttps://github.com/OCA/report-print-send
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pycups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2 tree 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
Models touched (5)

New fields (19)
  • action_window_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' readonly=True string='Action'
  • active Boolean
    default=True
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' copy=True help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • extra Text
    default='{}'
  • labelary_dpmm Selection
    default='8dpmm' required=True selection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')] string='Print density'
  • labelary_height Float
    default=70 string='Height in mm'
  • labelary_image Binary
    compute='_compute_labelary_image' string='Image from Labelary'
  • labelary_width Float
    default=140 string='Width in mm'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' ondelete='cascade' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • record_id Integer
    default=1 string='Record ID'
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • test_labelary_mode Boolean
    string='Mode Labelary'
  • test_print_mode Boolean
    string='Mode Print'
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (8)
  • 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_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(str(zpl2.JUSTIFY_LEFT), 'Left'), (str(zpl2.JUSTIFY_CENTER), 'Center'), (str(zpl2.JUSTIFY_JUSTIFIED), 'Justified'), (str(zpl2.JUSTIFY_RIGHT), 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=str(zpl2.COLOR_BLACK) help='Color of the line to draw.' selection=[(str(zpl2.COLOR_BLACK), 'Black'), (str(zpl2.COLOR_WHITE), 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' required=True selection=[('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'
  • data Text
    default=<expr> help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True
  • data_autofill Boolean
    help="Change 'data' with dictionary of the object information." string='Autofill Data'
  • diagonal_orientation Selection
    default=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_correction Selection
    default=str(zpl2.ERROR_CORRECTION_HIGH) help='Error correction for some barcode types like QR Code.' required=True selection=[(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')]
  • font Selection
    default=str(zpl2.FONT_DEFAULT) help='Font to use, for text only.' required=True selection=[(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_image Binary
    attachment=True help='This field holds a static image to print. If not set, the data field is evaluated.' string='Image'
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • magnification_factor Integer
    default=1 help='Magnification Factor, from 1 to 10.'
  • mask_value Integer
    default=7 help='Mask Value, from 0 to 7.'
  • model Selection
    default=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_id Many2one → ir.model
    comodel_name='ir.model' compute='_compute_model_id' string="Record's model"
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • only_product_barcode Boolean
    args: 'Only product barcode data'
  • orientation Selection
    default=str(zpl2.ORIENTATION_NORMAL) help='Orientation of the barcode.' required=True selection=[(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_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (6)
  • 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)
  • data Text
    help='Printer used to print the labels.' required=True
  • delete_component Boolean
    default=False string='Delete existing components'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' readonly=True required=True string='Label'
Public methods (1)
  • import_zpl2(self)

New fields (5)
  • active_model_id Many2one → ir.model
    comodel_name='ir.model' domain=<expr> string='Model'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • line_ids One2many → wizard.print.record.label.line
    args: 'wizard.print.record.label.line', 'label_header_id'
  • model Char
    related='active_model_id.model' string='Model Name'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    Prints a label per selected record

New fields (2)
  • label_header_id Many2one → wizard.print.record.label
    comodel_name='wizard.print.record.label'
  • label_no Integer
    string='# labels'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/16.0/printer_zpl2
VERSION
VERSION 1.1.2
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
COMMITTERS
COMMITTERSPedro M. Baeza, Laurent Mignon (ACSONE), Weblate, OCA-git-bot, oca-ci, duongtq, Kevin Luna
WEBSITE
WEBSITEhttps://github.com/OCA/report-print-send
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pycups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2 tree 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
Models touched (5)

New fields (19)
  • action_window_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' readonly=True string='Action'
  • active Boolean
    default=True
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' copy=True help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • extra Text
    default='{}'
  • labelary_dpmm Selection
    default='8dpmm' required=True selection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')] string='Print density'
  • labelary_height Float
    default=70 string='Height in mm'
  • labelary_image Binary
    compute='_compute_labelary_image' string='Image from Labelary'
  • labelary_width Float
    default=140 string='Width in mm'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' ondelete='cascade' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • record_id Integer
    default=1 string='Record ID'
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • test_labelary_mode Boolean
    string='Mode Labelary'
  • test_print_mode Boolean
    string='Mode Print'
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (8)
  • 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_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(str(zpl2.JUSTIFY_LEFT), 'Left'), (str(zpl2.JUSTIFY_CENTER), 'Center'), (str(zpl2.JUSTIFY_JUSTIFIED), 'Justified'), (str(zpl2.JUSTIFY_RIGHT), 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=str(zpl2.COLOR_BLACK) help='Color of the line to draw.' selection=[(str(zpl2.COLOR_BLACK), 'Black'), (str(zpl2.COLOR_WHITE), 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' required=True selection=[('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'
  • data Text
    default=<expr> help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True
  • data_autofill Boolean
    help="Change 'data' with dictionary of the object information." string='Autofill Data'
  • diagonal_orientation Selection
    default=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_correction Selection
    default=str(zpl2.ERROR_CORRECTION_HIGH) help='Error correction for some barcode types like QR Code.' required=True selection=[(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')]
  • font Selection
    default=str(zpl2.FONT_DEFAULT) help='Font to use, for text only.' required=True selection=[(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_image Binary
    attachment=True help='This field holds a static image to print. If not set, the data field is evaluated.' string='Image'
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • magnification_factor Integer
    default=1 help='Magnification Factor, from 1 to 10.'
  • mask_value Integer
    default=7 help='Mask Value, from 0 to 7.'
  • model Selection
    default=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_id Many2one → ir.model
    comodel_name='ir.model' compute='_compute_model_id' string="Record's model"
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • only_product_barcode Boolean
    args: 'Only product barcode data'
  • orientation Selection
    default=str(zpl2.ORIENTATION_NORMAL) help='Orientation of the barcode.' required=True selection=[(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_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (6)
  • 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)
  • data Text
    help='Printer used to print the labels.' required=True
  • delete_component Boolean
    default=False string='Delete existing components'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' readonly=True required=True string='Label'
Public methods (1)
  • import_zpl2(self)

New fields (5)
  • active_model_id Many2one → ir.model
    comodel_name='ir.model' domain=<expr> string='Model'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • line_ids One2many → wizard.print.record.label.line
    args: 'wizard.print.record.label.line', 'label_header_id'
  • model Char
    related='active_model_id.model' string='Model Name'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    Prints a label per selected record

New fields (2)
  • label_header_id Many2one → wizard.print.record.label
    comodel_name='wizard.print.record.label'
  • label_no Integer
    string='# labels'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/15.0/printer_zpl2
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
COMMITTERS
COMMITTERSFlorent de Labarre, Nils Hamerlinck, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/report-print-send
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:43
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pycups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2 tree 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
Models touched (5)

New fields (19)
  • action_window_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' readonly=True string='Action'
  • active Boolean
    default=True
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' copy=True help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • extra Text
    default='{}'
  • labelary_dpmm Selection
    default='8dpmm' required=True selection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')] string='Print density'
  • labelary_height Float
    default=70 string='Height in mm'
  • labelary_image Binary
    compute='_compute_labelary_image' string='Image from Labelary'
  • labelary_width Float
    default=140 string='Width in mm'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' ondelete='cascade' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • record_id Integer
    default=1 string='Record ID'
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • test_labelary_mode Boolean
    string='Mode Labelary'
  • test_print_mode Boolean
    string='Mode Print'
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (8)
  • 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_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(str(zpl2.JUSTIFY_LEFT), 'Left'), (str(zpl2.JUSTIFY_CENTER), 'Center'), (str(zpl2.JUSTIFY_JUSTIFIED), 'Justified'), (str(zpl2.JUSTIFY_RIGHT), 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=str(zpl2.COLOR_BLACK) help='Color of the line to draw.' selection=[(str(zpl2.COLOR_BLACK), 'Black'), (str(zpl2.COLOR_WHITE), 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' required=True selection=[('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'
  • data Text
    default=<expr> help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True
  • data_autofill Boolean
    help="Change 'data' with dictionary of the object information." string='Autofill Data'
  • diagonal_orientation Selection
    default=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_correction Selection
    default=str(zpl2.ERROR_CORRECTION_HIGH) help='Error correction for some barcode types like QR Code.' required=True selection=[(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')]
  • font Selection
    default=str(zpl2.FONT_DEFAULT) help='Font to use, for text only.' required=True selection=[(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_image Binary
    attachment=True help='This field holds a static image to print. If not set, the data field is evaluated.' string='Image'
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • magnification_factor Integer
    default=1 help='Magnification Factor, from 1 to 10.'
  • mask_value Integer
    default=7 help='Mask Value, from 0 to 7.'
  • model Selection
    default=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_id Many2one → ir.model
    comodel_name='ir.model' compute='_compute_model_id' string="Record's model"
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • only_product_barcode Boolean
    args: 'Only product barcode data'
  • orientation Selection
    default=str(zpl2.ORIENTATION_NORMAL) help='Orientation of the barcode.' required=True selection=[(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_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (6)
  • 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)
  • data Text
    help='Printer used to print the labels.' required=True
  • delete_component Boolean
    default=False string='Delete existing components'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' readonly=True required=True string='Label'
Public methods (1)
  • import_zpl2(self)

New fields (5)
  • active_model_id Many2one → ir.model
    comodel_name='ir.model' domain=<expr> string='Model'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • line_ids One2many → wizard.print.record.label.line
    args: 'wizard.print.record.label.line', 'label_header_id'
  • model Char
    related='active_model_id.model' string='Model Name'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    Prints a label per selected record

New fields (2)
  • label_header_id Many2one → wizard.print.record.label
    comodel_name='wizard.print.record.label'
  • label_no Integer
    string='# labels'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/14.0/printer_zpl2
VERSION
VERSION 2.1.1
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
COMMITTERS
COMMITTERSPedro M. Baeza, Lois Rilo, Pierre Verkest, Miquel Raïch, Sébastien Alix, oca-travis, Weblate, OCA-git-bot, oca-ci, oca-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/report-print-send
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pycups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2 tree 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
Models touched (5)

New fields (19)
  • action_window_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' readonly=True string='Action'
  • active Boolean
    default=True
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' copy=True help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • extra Text
    default='{}' string='Extra'
  • labelary_dpmm Selection
    default='8dpmm' required=True selection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')] string='Print density'
  • labelary_height Float
    default=70 string='Height in mm'
  • labelary_image Binary
    compute='_compute_labelary_image' string='Image from Labelary'
  • labelary_width Float
    default=140 string='Width in mm'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' ondelete='cascade' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • record_id Integer
    default=1 string='Record ID'
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • test_labelary_mode Boolean
    string='Mode Labelary'
  • test_print_mode Boolean
    string='Mode Print'
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (8)
  • 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_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(str(zpl2.JUSTIFY_LEFT), 'Left'), (str(zpl2.JUSTIFY_CENTER), 'Center'), (str(zpl2.JUSTIFY_JUSTIFIED), 'Justified'), (str(zpl2.JUSTIFY_RIGHT), 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=str(zpl2.COLOR_BLACK) help='Color of the line to draw.' selection=[(str(zpl2.COLOR_BLACK), 'Black'), (str(zpl2.COLOR_WHITE), 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' required=True selection=[('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'
  • data Text
    default=<expr> help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True
  • data_autofill Boolean
    help="Change 'data' with dictionary of the object information." string='Autofill Data'
  • diagonal_orientation Selection
    default=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_correction Selection
    default=str(zpl2.ERROR_CORRECTION_HIGH) help='Error correction for some barcode types like QR Code.' required=True selection=[(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')]
  • font Selection
    default=str(zpl2.FONT_DEFAULT) help='Font to use, for text only.' required=True selection=[(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_image Binary
    attachment=True help='This field holds a static image to print. If not set, the data field is evaluated.' string='Image'
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • magnification_factor Integer
    default=1 help='Magnification Factor, from 1 to 10.'
  • mask_value Integer
    default=7 help='Mask Value, from 0 to 7.'
  • model Selection
    default=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_id Many2one → ir.model
    comodel_name='ir.model' compute='_compute_model_id' string="Record's model"
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • only_product_barcode Boolean
    args: 'Only product barcode data'
  • orientation Selection
    default=str(zpl2.ORIENTATION_NORMAL) help='Orientation of the barcode.' required=True selection=[(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_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (6)
  • 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)
  • data Text
    help='Printer used to print the labels.' required=True
  • delete_component Boolean
    default=False string='Delete existing components'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' readonly=True required=True string='Label'
Public methods (1)
  • import_zpl2(self)

New fields (5)
  • active_model_id Many2one → ir.model
    comodel_name='ir.model' domain=<expr> string='Model'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • line_ids One2many → wizard.print.record.label.line
    args: 'wizard.print.record.label.line', 'label_header_id'
  • model Char
    related='active_model_id.model' string='Model Name'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    Prints a label per selected record

New fields (2)
  • label_header_id Many2one → wizard.print.record.label
    comodel_name='wizard.print.record.label'
  • label_no Integer
    string='# labels'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/13.0/printer_zpl2
VERSION
VERSION 2.1.0
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
COMMITTERS
COMMITTERSStéphane Bidoul, Pedro M. Baeza, mreficent, Enric Tobella, OCA Transbot, Miquel Raïch, oca-travis, Weblate, OCA-git-bot, oca-ci, Jaime Arroyo
WEBSITE
WEBSITEhttps://github.com/OCA/report-print-send
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pycups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2 tree 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
Models touched (5)

New fields (19)
  • action_window_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' readonly=True string='Action'
  • active Boolean
    default=True
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' copy=True help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • extra Text
    default='{}' string='Extra'
  • labelary_dpmm Selection
    default='8dpmm' required=True selection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')] string='Print density'
  • labelary_height Float
    default=70 string='Height in mm'
  • labelary_image Binary
    compute='_compute_labelary_image' string='Image from Labelary'
  • labelary_width Float
    default=140 string='Width in mm'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • record_id Integer
    default=1 string='Record ID'
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • test_labelary_mode Boolean
    string='Mode Labelary'
  • test_print_mode Boolean
    string='Mode Print'
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (8)
  • 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_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(str(zpl2.JUSTIFY_LEFT), 'Left'), (str(zpl2.JUSTIFY_CENTER), 'Center'), (str(zpl2.JUSTIFY_JUSTIFIED), 'Justified'), (str(zpl2.JUSTIFY_RIGHT), 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=str(zpl2.COLOR_BLACK) help='Color of the line to draw.' selection=[(str(zpl2.COLOR_BLACK), 'Black'), (str(zpl2.COLOR_WHITE), 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' required=True selection=[('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'
  • data Text
    default=<expr> help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True
  • data_autofill Boolean
    help="Change 'data' with dictionary of the object information." string='Autofill Data'
  • diagonal_orientation Selection
    default=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_correction Selection
    default=str(zpl2.ERROR_CORRECTION_HIGH) help='Error correction for some barcode types like QR Code.' required=True selection=[(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')]
  • font Selection
    default=str(zpl2.FONT_DEFAULT) help='Font to use, for text only.' required=True selection=[(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_image Binary
    attachment=True help='This field holds a static image to print. If not set, the data field is evaluated.' string='Image'
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • magnification_factor Integer
    default=1 help='Magnification Factor, from 1 to 10.'
  • mask_value Integer
    default=7 help='Mask Value, from 0 to 7.'
  • model Selection
    default=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_id Many2one → ir.model
    comodel_name='ir.model' compute='_compute_model_id' string="Record's model"
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • only_product_barcode Boolean
    args: 'Only product barcode data'
  • orientation Selection
    default=str(zpl2.ORIENTATION_NORMAL) help='Orientation of the barcode.' required=True selection=[(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_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (6)
  • 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)
  • data Text
    help='Printer used to print the labels.' required=True
  • delete_component Boolean
    default=False string='Delete existing components'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' readonly=True required=True string='Label'
Public methods (1)
  • import_zpl2(self)

New fields (5)
  • active_model_id Many2one → ir.model
    comodel_name='ir.model' domain=<expr> string='Model'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • line_ids One2many → wizard.print.record.label.line
    args: 'wizard.print.record.label.line', 'label_header_id'
  • model Char
    related='active_model_id.model' string='Model Name'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    Prints a label per selected record

New fields (2)
  • label_header_id Many2one → wizard.print.record.label
    comodel_name='wizard.print.record.label'
  • label_no Integer
    string='# labels'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/12.0/printer_zpl2
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SUBTENO-IT, FLorent de Labarre, Apertoso NV
COMMITTERS
COMMITTERSFlorent de Labarre, OCA Transbot, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttp://www.syleam.fr/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES zpl2
cups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2 tree 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
Models touched (4)

New fields (19)
  • action_window_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' readonly=True string='Action'
  • active Boolean
    default=True
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' copy=True help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • extra Text
    default='{}' string='Extra'
  • labelary_dpmm Selection
    default='8dpmm' required=True selection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')] string='Print density'
  • labelary_height Float
    default=70 string='Height in mm'
  • labelary_image Binary
    compute='_compute_labelary_image' string='Image from Labelary'
  • labelary_width Float
    default=140 string='Width in mm'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • record_id Integer
    default=1 string='Record ID'
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • test_labelary_mode Boolean
    string='Mode Labelary'
  • test_print_mode Boolean
    string='Mode Print'
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (5)
  • create_action(self)
  • import_zpl2(self)
  • print_label(self, printer, record, page_count=1, **extra)
  • print_test_label(self)
  • unlink_action(self)

New fields (42)
  • bar_width_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(zpl2.JUSTIFY_LEFT, 'Left'), (zpl2.JUSTIFY_CENTER, 'Center'), (zpl2.JUSTIFY_JUSTIFIED, 'Justified'), (zpl2.JUSTIFY_RIGHT, 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=zpl2.COLOR_BLACK help='Color of the line to draw.' selection=[(zpl2.COLOR_BLACK, 'Black'), (zpl2.COLOR_WHITE, 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' oldname='type' required=True selection=[('text', 'Text'), ('rectangle', 'Rectangle / Line'), ('diagonal', 'Diagonal 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'), (zpl2.BARCODE_CODE_49, 'Code 49'), (zpl2.BARCODE_PDF417, 'PDF417'), (zpl2.BARCODE_EAN_8, 'EAN-8'), (zpl2.BARCODE_UPC_E, 'UPC-E'), (zpl2.BARCODE_CODE_128, 'Code 128'), (zpl2.BARCODE_EAN_13, 'EAN-13'), (zpl2.BARCODE_QR_CODE, 'QR Code'), ('sublabel', 'Sublabel'), ('zpl2_raw', 'ZPL2')] string='Type'
  • data Text
    default=DEFAULT_PYTHON_CODE help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True
  • diagonal_orientation Selection
    default=zpl2.DIAGONAL_ORIENTATION_LEFT help='Orientation of the diagonal line.' selection=[(zpl2.DIAGONAL_ORIENTATION_LEFT, 'Left (\\)'), (zpl2.DIAGONAL_ORIENTATION_RIGHT, 'Right (/)')]
  • error_correction Selection
    default=zpl2.ERROR_CORRECTION_HIGH help='Error correction for some barcode types like QR Code.' required=True selection=[(zpl2.ERROR_CORRECTION_ULTRA_HIGH, 'Ultra-high Reliability Level'), (zpl2.ERROR_CORRECTION_HIGH, 'High Reliability Level'), (zpl2.ERROR_CORRECTION_STANDARD, 'Standard Level'), (zpl2.ERROR_CORRECTION_HIGH_DENSITY, 'High Density Level')]
  • font Selection
    default=zpl2.FONT_DEFAULT help='Font to use, for text only.' required=True selection=[(zpl2.FONT_DEFAULT, 'Default'), (zpl2.FONT_9X5, '9x5'), (zpl2.FONT_11X7, '11x7'), (zpl2.FONT_18X10, '18x10'), (zpl2.FONT_28X15, '28x15'), (zpl2.FONT_26X13, '26x13'), (zpl2.FONT_60X40, '60x40'), (zpl2.FONT_21X13, '21x13')]
  • graphic_image Binary
    attachment=True help='This field holds a static image to print. If not set, the data field is evaluated.' string='Image'
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • magnification_factor Integer
    default=1 help='Magnification Factor, from 1 to 10.'
  • mask_value Integer
    default=7 help='Mask Value, from 0 to 7.'
  • model Selection
    default=zpl2.MODEL_ENHANCED help='Barcode model, used by some barcode types like QR Code.' selection=[(zpl2.MODEL_ORIGINAL, 'Original'), (zpl2.MODEL_ENHANCED, 'Enhanced')]
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • orientation Selection
    default=zpl2.ORIENTATION_NORMAL help='Orientation of the barcode.' required=True selection=[(zpl2.ORIENTATION_NORMAL, 'Normal'), (zpl2.ORIENTATION_ROTATED, 'Rotated'), (zpl2.ORIENTATION_INVERTED, 'Inverted'), (zpl2.ORIENTATION_BOTTOM_UP, 'Read from Bottom up')]
  • origin_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (4)
  • action_minus_origin_x(self)
  • action_minus_origin_y(self)
  • action_plus_origin_x(self)
  • action_plus_origin_y(self)

New fields (3)
  • data Text
    help='Printer used to print the labels.' required=True
  • delete_component Boolean
    default=False string='Delete existing components'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' readonly=True required=True string='Label'
Public methods (1)
  • import_zpl2(self)

New fields (2)
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    Prints a label per selected record
REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/11.0/printer_zpl2
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Apertoso NV, SYLEAM
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Apertoso NV, SYLEAM
COMMITTERS
COMMITTERSEnric Tobella, Florent de Labarre, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Sylvain GARANCHER
WEBSITE
WEBSITEhttp://www.syleam.fr/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES zpl2
cups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2 tree 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
Models touched (4)

New fields (19)
  • action_window_id Many2one → ir.actions.act_window
    comodel_name='ir.actions.act_window' readonly=True string='Action'
  • active Boolean
    default=True
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • extra Text
    default='{}' string='Extra'
  • labelary_dpmm Selection
    default='8dpmm' required=True selection=[('6dpmm', '6dpmm (152 pdi)'), ('8dpmm', '8dpmm (203 dpi)'), ('12dpmm', '12dpmm (300 pdi)'), ('24dpmm', '24dpmm (600 dpi)')] string='Print density'
  • labelary_height Float
    default=70 string='Height in mm'
  • labelary_image Binary
    readonly=True string='Image from Labelary'
  • labelary_width Float
    default=140 string='Width in mm'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • record_id Integer
    default=1 string='Record ID'
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • test_labelary_mode Boolean
    string='Mode Labelary'
  • test_print_mode Boolean
    string='Mode Print'
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (5)
  • create_action(self)
  • import_zpl2(self)
  • print_label(self, printer, record, page_count=1, **extra)
  • print_test_label(self)
  • unlink_action(self)

New fields (42)
  • bar_width_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(zpl2.JUSTIFY_LEFT, 'Left'), (zpl2.JUSTIFY_CENTER, 'Center'), (zpl2.JUSTIFY_JUSTIFIED, 'Justified'), (zpl2.JUSTIFY_RIGHT, 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=zpl2.COLOR_BLACK help='Color of the line to draw.' selection=[(zpl2.COLOR_BLACK, 'Black'), (zpl2.COLOR_WHITE, 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' oldname='type' required=True selection=[('text', 'Text'), ('rectangle', 'Rectangle / Line'), ('diagonal', 'Diagonal 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'), (zpl2.BARCODE_CODE_49, 'Code 49'), (zpl2.BARCODE_PDF417, 'PDF417'), (zpl2.BARCODE_EAN_8, 'EAN-8'), (zpl2.BARCODE_UPC_E, 'UPC-E'), (zpl2.BARCODE_CODE_128, 'Code 128'), (zpl2.BARCODE_EAN_13, 'EAN-13'), (zpl2.BARCODE_QR_CODE, 'QR Code'), ('sublabel', 'Sublabel'), ('zpl2_raw', 'ZPL2')] string='Type'
  • data Text
    default=DEFAULT_PYTHON_CODE help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True
  • diagonal_orientation Selection
    default=zpl2.DIAGONAL_ORIENTATION_LEFT help='Orientation of the diagonal line.' selection=[(zpl2.DIAGONAL_ORIENTATION_LEFT, 'Left (\\)'), (zpl2.DIAGONAL_ORIENTATION_RIGHT, 'Right (/)')]
  • error_correction Selection
    default=zpl2.ERROR_CORRECTION_HIGH help='Error correction for some barcode types like QR Code.' required=True selection=[(zpl2.ERROR_CORRECTION_ULTRA_HIGH, 'Ultra-high Reliability Level'), (zpl2.ERROR_CORRECTION_HIGH, 'High Reliability Level'), (zpl2.ERROR_CORRECTION_STANDARD, 'Standard Level'), (zpl2.ERROR_CORRECTION_HIGH_DENSITY, 'High Density Level')]
  • font Selection
    default=zpl2.FONT_DEFAULT help='Font to use, for text only.' required=True selection=[(zpl2.FONT_DEFAULT, 'Default'), (zpl2.FONT_9X5, '9x5'), (zpl2.FONT_11X7, '11x7'), (zpl2.FONT_18X10, '18x10'), (zpl2.FONT_28X15, '28x15'), (zpl2.FONT_26X13, '26x13'), (zpl2.FONT_60X40, '60x40'), (zpl2.FONT_21X13, '21x13')]
  • graphic_image Binary
    attachment=True help='This field holds a static image to print. If not set, the data field is evaluated.' string='Image'
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • magnification_factor Integer
    default=1 help='Magnification Factor, from 1 to 10.'
  • mask_value Integer
    default=7 help='Mask Value, from 0 to 7.'
  • model Selection
    default=zpl2.MODEL_ENHANCED help='Barcode model, used by some barcode types like QR Code.' selection=[(zpl2.MODEL_ORIGINAL, 'Original'), (zpl2.MODEL_ENHANCED, 'Enhanced')]
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • orientation Selection
    default=zpl2.ORIENTATION_NORMAL help='Orientation of the barcode.' required=True selection=[(zpl2.ORIENTATION_NORMAL, 'Normal'), (zpl2.ORIENTATION_ROTATED, 'Rotated'), (zpl2.ORIENTATION_INVERTED, 'Inverted'), (zpl2.ORIENTATION_BOTTOM_UP, 'Read from Bottom up')]
  • origin_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (0)

No public methods.

New fields (3)
  • data Text
    help='Printer used to print the labels.' required=True
  • delete_component Boolean
    default=False string='Delete existing components'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' readonly=True required=True string='Label'
Public methods (1)
  • import_zpl2(self)

New fields (2)
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    Prints a label per selected record
REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/10.0/printer_zpl2
VERSION
VERSION 1.1.2
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SYLEAM
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SYLEAM
COMMITTERS
COMMITTERSJos De Graeve, GitHub, Florent de Labarre, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Sylvain GARANCHER
WEBSITE
WEBSITEhttp://www.syleam.fr/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:20:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - report
    - base
    - web
    - base_setup
    - web_kanban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES zpl2
cups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2.form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2.search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2.tree printing.label.zpl2 tree New
view_wizard_print_product_label_form wizard.print.record.label.form wizard.print.record.label form New
Models touched (3)

New fields (8)
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • restore_saved_config Boolean
    default=True help="Restore printer's saved configuration and end of each label " string="Restore printer's configuration"
  • width Integer
    default=480 help='Width of the label, will be set on the printer before printing.' required=True
Public methods (1)
  • print_label(self, printer, record, page_count=1, **extra)
    @api.multi

New fields (36)
  • bar_width_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(zpl2.JUSTIFY_LEFT, 'Left'), (zpl2.JUSTIFY_CENTER, 'Center'), (zpl2.JUSTIFY_JUSTIFIED, 'Justified'), (zpl2.JUSTIFY_RIGHT, 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=zpl2.COLOR_BLACK help='Color of the line to draw.' selection=[(zpl2.COLOR_BLACK, 'Black'), (zpl2.COLOR_WHITE, 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' oldname='type' required=True selection=[('text', 'Text'), ('rectangle', 'Rectangle / Line'), ('circle', 'Circle'), (zpl2.BARCODE_CODE_11, 'Code 11'), (zpl2.BARCODE_INTERLEAVED_2_OF_5, 'Interleaved 2 of 5'), (zpl2.BARCODE_CODE_39, 'Code 39'), (zpl2.BARCODE_CODE_49, 'Code 49'), (zpl2.BARCODE_PDF417, 'PDF417'), (zpl2.BARCODE_EAN_8, 'EAN-8'), (zpl2.BARCODE_UPC_E, 'UPC-E'), (zpl2.BARCODE_CODE_128, 'Code 128'), (zpl2.BARCODE_EAN_13, 'EAN-13'), ('sublabel', 'Sublabel')] string='Type'
  • data Char
    default='""' help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True size=256
  • font Selection
    default=zpl2.FONT_DEFAULT help='Font to use, for text only.' required=True selection=[(zpl2.FONT_DEFAULT, 'Default'), (zpl2.FONT_9X5, '9x5'), (zpl2.FONT_11X7, '11x7'), (zpl2.FONT_18X10, '18x10'), (zpl2.FONT_28X15, '28x15'), (zpl2.FONT_26X13, '26x13'), (zpl2.FONT_60X40, '60x40'), (zpl2.FONT_21X13, '21x13')]
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • orientation Selection
    default=zpl2.ORIENTATION_NORMAL help='Orientation of the barcode.' required=True selection=[(zpl2.ORIENTATION_NORMAL, 'Normal'), (zpl2.ORIENTATION_ROTATED, 'Rotated'), (zpl2.ORIENTATION_INVERTED, 'Inverted'), (zpl2.ORIENTATION_BOTTOM_UP, 'Read from Bottom up')]
  • origin_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (0)

No public methods.

New fields (2)
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    @api.multi
    Prints a label per selected record
REPOSITORY
REPOSITORYOCA/report-print-send
GIT
GIThttps://github.com/OCA/report-print-send.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/report-print-send/tree/9.0/printer_zpl2
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPrinter
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), SYLEAM
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), SYLEAM
COMMITTERS
COMMITTERSGitHub, OCA Transbot, Dave Lasley, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttp://www.syleam.fr/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:24
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/report-print-send:
    - base_report_to_printer
odoo/odoo:
    - report
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES zpl2
cups
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
view_printing_label_zpl2_form printing.label.zpl2.form printing.label.zpl2 form New
view_printing_label_zpl2_search printing.label.zpl2.search printing.label.zpl2 search New
view_printing_label_zpl2_tree printing.label.zpl2.tree printing.label.zpl2 tree New
view_wizard_print_product_label_form wizard.print.record.label.form wizard.print.record.label form New
Models touched (3)

New fields (7)
  • component_ids One2many → printing.label.zpl2.component
    comodel_name='printing.label.zpl2.component' help='Components which will be printed on the label.' inverse_name='label_id' string='Label Components'
  • description Char
    help='Long description for this label.'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used to print this label.' required=True string='Model'
  • name Char
    help='Label Name.' required=True
  • origin_x Integer
    default=10 help='Origin point of the contents in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the contents in the label, Y coordinate.' required=True
  • width Integer
    default=480 help='With of the label, will be set on the printer before printing.' required=True
Public methods (1)
  • print_label(self, printer, record, page_count=1, **extra)
    @api.multi

New fields (36)
  • bar_width_ratio Float
    default=3.0 help='Ratio between wide bar and narrow bar.'
  • block_justify Selection
    default='L' help='Choose how the text will be justified in the block.' required=True selection=[(zpl2.JUSTIFY_LEFT, 'Left'), (zpl2.JUSTIFY_CENTER, 'Center'), (zpl2.JUSTIFY_JUSTIFIED, 'Justified'), (zpl2.JUSTIFY_RIGHT, 'Right')] string='Justify'
  • block_left_margin Integer
    help='Left margin for the second and other lines in the block.' string='Left Margin'
  • block_lines Integer
    default=1 help='Maximum number of lines to print in the block.'
  • block_spaces Integer
    help='Number of spaces added between lines in the block.'
  • block_width Integer
    help='Width of the block.'
  • check_digits Boolean
    help='Check if you want to compute and print the check digit.'
  • color Selection
    default=zpl2.COLOR_BLACK help='Color of the line to draw.' selection=[(zpl2.COLOR_BLACK, 'Black'), (zpl2.COLOR_WHITE, 'White')]
  • columns_count Integer
    help='Number of data columns to encode.'
  • component_type Selection
    default='text' help='Type of content, simple text or barcode.' oldname='type' required=True selection=[('text', 'Text'), ('rectangle', 'Rectangle / Line'), ('circle', 'Circle'), (zpl2.BARCODE_CODE_11, 'Code 11'), (zpl2.BARCODE_INTERLEAVED_2_OF_5, 'Interleaved 2 of 5'), (zpl2.BARCODE_CODE_39, 'Code 39'), (zpl2.BARCODE_CODE_49, 'Code 49'), (zpl2.BARCODE_PDF417, 'PDF417'), (zpl2.BARCODE_EAN_8, 'EAN-8'), (zpl2.BARCODE_UPC_E, 'UPC-E'), (zpl2.BARCODE_CODE_128, 'Code 128'), (zpl2.BARCODE_EAN_13, 'EAN-13'), ('sublabel', 'Sublabel')] string='Type'
  • data Char
    default='""' help='Data to print on this component. Resource values can be inserted with %(object.field_name)s.' required=True size=256
  • font Selection
    default=zpl2.FONT_DEFAULT help='Font to use, for text only.' required=True selection=[(zpl2.FONT_DEFAULT, 'Default'), (zpl2.FONT_9X5, '9x5'), (zpl2.FONT_11X7, '11x7'), (zpl2.FONT_18X10, '18x10'), (zpl2.FONT_28X15, '28x15'), (zpl2.FONT_26X13, '26x13'), (zpl2.FONT_60X40, '60x40'), (zpl2.FONT_21X13, '21x13')]
  • height Integer
    help='Height of the printed component. For a text component, height of a single character.'
  • in_block Boolean
    help='If checked, the data will be restrected in a defined block on the label.'
  • interpretation_line Boolean
    help='Check if you want the interpretation line to be printed.'
  • interpretation_line_above Boolean
    help='Check if you want the interpretation line to be printed above the barcode.'
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Label using this component.' ondelete='cascade' required=True string='Label'
  • module_width Integer
    default=2 help='Module width for the barcode.'
  • name Char
    help='Name of the component.' required=True
  • orientation Selection
    default=zpl2.ORIENTATION_NORMAL help='Orientation of the barcode.' required=True selection=[(zpl2.ORIENTATION_NORMAL, 'Normal'), (zpl2.ORIENTATION_ROTATED, 'Rotated'), (zpl2.ORIENTATION_INVERTED, 'Inverted'), (zpl2.ORIENTATION_BOTTOM_UP, 'Read from Bottom up')]
  • origin_x Integer
    default=10 help='Origin point of the component in the label, X coordinate.' required=True
  • origin_y Integer
    default=10 help='Origin point of the component in the label, Y coordinate.' required=True
  • repeat Boolean
    help='Check this box to repeat this component on the label.' string='Repeatable'
  • repeat_count Integer
    default=1 help='Maximum count of repeats of the component.'
  • repeat_offset Integer
    default=0 help='Number of elements to skip when reading a list of elements.'
  • repeat_offset_x Integer
    help='X coordinate offset between each occurence of this component on the label.'
  • repeat_offset_y Integer
    help='Y coordinate offset between each occurence of this component on the label.'
  • reverse_print Boolean
    help='If checked, the data will be printed in the inverse color of the background.'
  • rounding Integer
    help='Rounding of the printed rectangle corners.'
  • rows_count Integer
    help='Number of rows to encode.'
  • security_level Integer
    help='Security level for error detection.'
  • sequence Integer
    help='Order used to print the elements.'
  • sublabel_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' help='Another label to include into this one as a component. This allows to define reusable labels parts.' string='Sublabel'
  • thickness Integer
    help='Thickness of the line to draw.'
  • truncate Boolean
    help='Check if you want to truncate the barcode.'
  • width Integer
    help='Width of the printed component. For a text component, width of a single character.'
Public methods (0)

No public methods.

New fields (2)
  • label_id Many2one → printing.label.zpl2
    comodel_name='printing.label.zpl2' domain=<expr> help='Label to print.' required=True string='Label'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the labels.' required=True string='Printer'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • print_label(self)
    @api.multi
    Prints a label per selected record
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/report-print-send
PULL REQUEST
PULL REQUEST[19.0][MIG] printer_zpl2 (#466)