| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 21 |
| Technical Name |
zpl_lot_label |
| License | LGPL-3 |
| Website | https://sebenz.co.za |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 21 |
| Technical Name |
zpl_lot_label |
| License | LGPL-3 |
| Website | https://sebenz.co.za |
ZPL Lot Label
Print Zebra barcode labels for stock lots directly from Odoo
Adds a Print → ZPL Lot Label action to stock lot records. Outputs raw ZPL (Zebra Printer Language) commands for direct printing on any Zebra-compatible label printer — no PDF, no driver required.
Label layout
Barcode 1 — Lot number
Code 128 barcode of the lot name, printed at the top of the label.
Human-readable text
Lot display name printed alongside the barcode for easy visual identification.
Barcode 2 — Internal reference
Second Code 128 barcode using the lot's internal reference, or the lot name if no reference is set.
How it works
The report type is qweb-text — Odoo renders the template as plain text
(raw ZPL commands) and serves it directly. No PDF conversion. Works with:
- Browser-based ZPL print utilities (send raw output to printer port)
- Direct IP printing to Zebra printers on your network
- Any print service that accepts raw ZPL over TCP/IP (port 9100)
Test without a physical printer: Open Odoo, print a label, copy the ZPL output and paste it into labelary.com/viewer.html for an instant browser preview.
Customisation
The label template uses standard ZPL commands. To adjust the layout for your
label size or printer DPI, edit reports/label_template.xml and
modify the ^FO coordinate values.
If you use a custom barcode field on stock.lot, change the
barcode_value line in the template to reference your field.
ZPL coordinates are calculated at 203 dpi (standard Zebra printer resolution).
Scale ^FO values by 1.48 for 300 dpi printers.
ZPL Lot Label
Adds a Print → ZPL Lot Label action to stock lot records. Outputs raw ZPL (Zebra Printer Language) commands for direct printing on any Zebra-compatible label printer — no PDF conversion, no driver required.
Features
- One-click label printing from any stock.lot record.
- qweb-text report type — plain ZPL sent directly to the printer.
- Two Code 128 barcodes per label: lot number (top) and internal reference (bottom).
- Human-readable lot display name printed between the barcodes.
- Works with browser-based ZPL utilities, direct IP printing (port 9100), and any ZPL-capable print service.
- Test without a printer: paste the output into https://labelary.com/viewer.html
Requirements
- stock (standard Odoo Inventory module)
- Odoo 18.0
- Any Zebra-compatible label printer (template coordinates calculated at 203 dpi)
Installation
- Copy the zpl_lot_label folder into your Odoo addons path.
- Restart the Odoo server.
- Go to Apps → Update Apps List.
- Search for ZPL Lot Label and click Install.
Usage
- Open Inventory → Products → Lots/Serial Numbers.
- Select one or more lot records.
- Click Print → ZPL Lot Label.
- Send the plain-text output to your Zebra printer.
Label layout
The default label contains:
- Barcode 1 (top, Code 128) — the lot name (stock.lot.name).
- Human-readable text — the lot display name.
- Barcode 2 (bottom, Code 128) — the internal reference (stock.lot.ref), falling back to the lot name if no reference is set.
Customisation
The label template is defined in reports/label_template.xml using standard ZPL commands.
Adjusting for label size or printer DPI
Modify the ^FO coordinate values in the template. Default coordinates are calculated at 203 dpi. For a 300 dpi printer, scale all ^FO values by approximately 1.48 (300 / 203).
Using a custom barcode field
If your stock.lot records have a custom barcode field (e.g. added via Odoo Studio), change the barcode_value line in reports/label_template.xml to reference your field instead of the default lot.ref / lot.name fallback.
License
LGPL-3
Please log in to comment on this module