Skip to main content

Add a ZPL II label printing feature

Project description

Beta License: AGPL-3 OCA/report-print-send Translate me on Weblate Try me on Runboat

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.

Table of contents

Installation

Nothing special, just install the module.

Configuration

To configure this module, you need to:

  1. Go to Settings > Printing > Labels > ZPL II

  2. Create new labels

  3. Import ZPL2 code

  4. Use the Test Mode tab during the creation

It’s also possible to add a label printing wizard on any model by creating a new ir.actions.act_window record. For example, to add the printing wizard on the product.product model

<act_window id="action_wizard_purchase"
  name="Print Label"
  src_model="product.product"
  res_model="wizard.print.record.label"
  view_mode="form"
  target="new"
  key2="client_action_multi"/>

Usage

To print a label, you need to call use the label printing method from anywhere (other modules, server actions, etc.).

Example : Print the label of a product

self.env['printing.label.zpl2'].browse(label_id).print_label(
    self.env['printing.printer'].browse(printer_id),
    self.env['product.product'].browse(product_id))

You can also use the generic label printing wizard, if added on some models.

Try me on Runbot

Changelog

13.0.1.0.0 (2019-09-30)

  • [RELEASE] Port from V12.

  • Selection lists do not support integers any longer

  • Binary field now returns False when empty instead of none, change tests to reflect this

  • work around an appels vs oranges warning

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • SUBTENO-IT

  • FLorent de Labarre

  • Apertoso NV

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/report-print-send project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file odoo_addon_printer_zpl2-16.0.1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_printer_zpl2-16.0.1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cc10510c007488b9a360a93f1e86210d90b6031588ba2cdda870d8881f4c2e8
MD5 6d3f380dec0230a066483cec95fcc002
BLAKE2b-256 3c80c6f426b8c5457cca8c20148f23c6e0fe58dd7bef2e5857784d36c859745c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page