Skip to content

[19.0][ADD] pos_printing_qztray: New Module#1537

Open
miquelalzanillas wants to merge 1 commit into
OCA:19.0from
APSL:19.0-add-pos_printing_qz
Open

[19.0][ADD] pos_printing_qztray: New Module#1537
miquelalzanillas wants to merge 1 commit into
OCA:19.0from
APSL:19.0-add-pos_printing_qz

Conversation

@miquelalzanillas

@miquelalzanillas miquelalzanillas commented Apr 28, 2026

Copy link
Copy Markdown

POS Printing QZTray

This module provides an alternative to the Odoo IoT Box for thermal receipt printing in the Point of Sale, using QZ Tray as the print driver.

It extends the existing base_report_to_printer_qztray module — which adds QZ Tray backend support to printing.printer — and brings that functionality into the POS, allowing users to select a printer with backend = qztray directly from the POS configuration.

What this module does?

ESC/POS receipt template using python-escpos library: controllers/main.py contains a full receipt template that generates ESC/POS commands server-side using python-escpos. The template is easily extendable and inheritable from Python without touching any frontend code.

PNG fallback: When no order can be matched (e.g. reprints from the Ticket Screen), the standard HTML receipt is rendered to a raster PNG and converted to ESC/POS format.

Cash drawer support: Sending the cash drawer open command (ESC p) is supported out of the box.

No IoT Box required: The module is designed as a pure-software alternative to the IoT Box, suitable for setups where deploying IoT infrastructure is not desirable.

Configuration

Install and run QZ Tray on the POS machine.

Go to Point of Sale > Configuration > Settings.

Enable QZ Tray Printing and optionally select a printer with backend qztray. If left empty, the system default printer is used.

image image

@angelmoya @cubells @ppyczko @BernatObrador @mpascuall

@miquelalzanillas miquelalzanillas force-pushed the 19.0-add-pos_printing_qz branch 3 times, most recently from 64726c0 to c30d951 Compare April 29, 2026 08:24
@cvinh

cvinh commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Thanks for your module, I have a question :
Can kitchen tickets be printed with this module ? (on a network printer...)?

@miquelalzanillas miquelalzanillas force-pushed the 19.0-add-pos_printing_qz branch 2 times, most recently from f28a58c to e2d885b Compare April 29, 2026 08:51
@miquelalzanillas

Copy link
Copy Markdown
Author

Thanks for your module, I have a question : Can kitchen tickets be printed with this module ? (on a network printer...)?

Hello @cvinh ,

No for the moment but I think it can be implemented with not too much effort.

@miquelalzanillas miquelalzanillas force-pushed the 19.0-add-pos_printing_qz branch from e2d885b to 800470a Compare May 4, 2026 15:16
@OCA-git-bot OCA-git-bot added mod:pos_printing_qztray Module pos_printing_qztray and removed mod:pos_printing_qz Module pos_printing_qz labels May 4, 2026
@miquelalzanillas miquelalzanillas changed the title [19.0][ADD] pos_printing_qz: New Module [19.0][ADD] pos_printing_qztray: New Module May 4, 2026
@miquelalzanillas miquelalzanillas force-pushed the 19.0-add-pos_printing_qz branch from 800470a to 388500c Compare May 4, 2026 18:18
@OCA-git-bot OCA-git-bot added mod:pos_printing_qz Module pos_printing_qz and removed mod:pos_printing_qztray Module pos_printing_qztray labels May 4, 2026
@miquelalzanillas miquelalzanillas force-pushed the 19.0-add-pos_printing_qz branch 2 times, most recently from 65d9122 to 9587b85 Compare May 4, 2026 18:37
@OCA-git-bot OCA-git-bot added mod:pos_printing_qztray Module pos_printing_qztray and removed mod:pos_printing_qz Module pos_printing_qz labels May 4, 2026
@miquelalzanillas miquelalzanillas force-pushed the 19.0-add-pos_printing_qz branch from 9587b85 to 329844e Compare May 4, 2026 18:38
@miquelalzanillas miquelalzanillas force-pushed the 19.0-add-pos_printing_qz branch from 8ed0b1a to 29e216f Compare May 28, 2026 13:53

@BernatObrador BernatObrador left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ppyczko ppyczko left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested and working in a production environment!

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I've done all the required configuration like creating qz type printer, setting system parameters for qz certificate and private key, set qz printer in POS session in my local.

  • I've tried to test with two types of printers: Virtual printer(Using 'Add printer' from cups web interface) and real printer(Brother DCP-T525W)
    Case-1: Virtual printer(Generic PDF printer): When I tried to print using this, generated PDF is blank.
    Case-2: After clicking print, I get 'printing on...' and 'printing completed...' popups, but doesn't get any actual print from printer.

  • In wither case, one thing I noticed is blank print preview in standard print dialog. Proper print preview was there when this module was not installed.

  • Could you please check and confirm?

@BernatObrador

Copy link
Copy Markdown
Contributor

Hi @BhaveshHeliconia,
I think this is expected if the tested printers are not ESC/POS/raw-compatible printers. This module generates ESC/POS/raw data and sends it through QZ Tray, so a generic PDF printer or a standard inkjet/MFP driver will not render it like normal HTML/PDF printing. It should be tested with a real ESC/POS-compatible thermal printer, or with a raw-capable printer/driver/emulator. The “printing completed” message only means QZ/OS accepted the job, not necessarily that the target printer understood the ESC/POS commands.

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor

@BernatObrador What about blank print preview in standard print dialog? Is this also expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants