OdooWiki OCA HUB

Report to QZ Tray

base_report_to_printer_qztray folder_open OCA/report-print-send open_in_new
Generic Modules/Base License: AGPL-3

QZ Tray Printing Backend

This module adds support for printing Odoo reports directly from the client machine using QZ Tray as a printing backend.

It allows reports to be sent securely to locally installed printers without relying on server-side printing systems such as CUPS. Instead, printing is handled on the client side through QZ Tray, enabling direct access to USB, network, or system printers.

This backend is especially useful in environments where client-side printing is required, such as Point of Sale setups, kiosk systems, or deployments where the Odoo server does not have access to the printers used by end users.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

This module lets Odoo send reports straight to printers installed on the user's own computer using QZ Tray, without needing a print server. It adds a "QZTray" option to printing printers and handles the secure connection and printing in the browser.

When a report is printed, Odoo can now use QZ Tray as the printing method instead of a server-side system. A new backend option called "QZTray" appears on printing printer records, so you can mark a printer as being handled by QZ Tray.

  • The report is prepared in the browser and sent to a printer on the user's machine, which is useful for Point of Sale, kiosks, or when the Odoo server cannot reach the printers.
  • The module adds a small script to every page that loads the QZ Tray library, and it registers a printing handler for reports.
  • It provides two web addresses used for security: one gives the QZ Tray certificate, and the other signs messages with a private key. Both are stored in Odoo's system settings.
  • When printing, the system checks that the chosen printer uses the QZTray backend. If so, it generates the report as a PDF, connects to QZ Tray (optionally to a specific host if the printer name contains a backslash), finds the printer, sends the document, and shows a success message. If something fails, it shows an error message and disconnects.

The module extends the report action and printing printer models, and it adds a template that loads the QZ Tray library into the web layout.

Required by other modules

Models and fields (2)
  • printing.printer · extends an existing modelbackend
  • ir.actions.report · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/report-print-send.

terminal Installation and usage

OCA documentation · Odoo 19.0

This module requires QZ Tray to be installed and properly configured on the client machine, as well as additional setup on the Odoo server to enable secure communication.

Prerequisites

  • Install QZ Tray on the client

Download and install QZ Tray on every client that will send print jobs:

https://qz.io/download/

Make sure QZ Tray is running before attempting to print from Odoo.

---

  • Install pyOpenSSL on the Odoo server

pyOpenSSL is required to sign the messages sent to QZ Tray. This avoids security warnings and allows trusted communication.

sudo pip3 install pyOpenSSL

If you are using a virtual environment, make sure to install it inside that environment.

  • Generate a signing certificate

Generate a self-signed certificate that will be used by Odoo to sign QZ Tray messages.

When prompted for:

Common Name (e.g. server FQDN or YOUR name) []:

You must enter your Odoo domain name.

You can also use a wildcard domain, for example:

*.my-odoo-domain.com

Generate the certificate with:

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 -nodes

This will generate two files:

cert.pem → public certificate

key.pem → private key

  • Configure the certificate in Odoo

Log in to Odoo with administrator privileges and enable developer mode. Then go to:

  • Settings -> Technical -> Parameters -> System Parameters

Create the following parameters:

| Key | Value | |----------------|---------------------------------| | qz.certificate | Content of cert.pem (full text) | | qz.key | Content of key.pem (full text) |

Make sure to copy the full contents, including the BEGIN and END lines.

  • Install the certificate in QZ Tray (client side)

On the client machine:

  • Open the QZ Tray menu.
  • Go to Advanced → Site Manager.
  • Drag and drop the cert.pem file into the Site Manager.
  • Ensure the certificate is associated with your Odoo domain.

This step authorizes your Odoo server to send signed print jobs to QZ Tray.

Notes

  • Each client machine must have QZ Tray installed and running.
  • The certificate must match the domain used to access Odoo.
  • The same certificate can be used in all client machines.
  • This module is designed to be backend-agnostic and works together with other base_report_to_printer_* backends.

This document explains how to configure the base_report_to_printer_qz module before using it. It is intended for users with administration privileges.

---

  • Configure a Printer Using QZ Tray Backend

The module relies on printers configured in Odoo that use the QZ Tray backend.

Create or Configure a Printer

  • Go to Settings → Technical → Printing → Printers.
  • Click Create (or open an existing printer).
  • Configure the printer with the following values:
  • Name: Must match exactly the printer name installed on the client operating system and visible in QZ Tray.
  • Backend: Select QZ Tray.

> The print jobs will be sent to the locally installed printer whose name matches > the configured printer name in Odoo.

---

  • Assign the Printer (Optional but Recommended)

You can define which printer is used by default at different levels.

Per User

  • Go to Settings → Users & Companies → Users.
  • Open the user.
  • Set:
  • Printing Action (e.g. Send to Printer).
  • Printing Printer (select the QZ Tray printer created earlier).
  • Save.

Per Report (Optional)

  • Go to Settings → Technical → Reports.
  • Open the report you want to print automatically.
  • Configure:
  • Printing Action
  • Printing Printer
  • Save.

User-level settings will always take precedence over report-level settings.

---

  • Client-Side Requirements

Ensure the following on each client machine:

  • QZ Tray is installed and running.
  • The client trusts the certificate configured in Odoo.
  • The printer is installed locally and its name matches the one configured in Odoo.

---

Once these steps are completed, reports configured to be sent to the printer will be printed through QZ Tray without further user interaction.

Guidelines for use:

> - To print a report on a specific printer or tray, you can change > these in Settings \> Printing \> Reports to define default > behaviour. > - To print a report on a specific printer and/or tray for a user, you > can change these in Settings \> Printing \> Reports in Specific > actions per user > - Users may also select a default action, printer or tray in their > preferences.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.