Report to QZ Tray
Project description
Report to QZ Tray
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.
Table of contents
Installation
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
1. Install QZ Tray on the client
Download and install QZ Tray on every client that will send print jobs:
Make sure QZ Tray is running before attempting to print from Odoo.
2. 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.
3. 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
4. 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.
5. 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.
Configuration
This document explains how to configure the base_report_to_printer_qz module before using it. It is intended for users with administration privileges.
1. 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.
3. 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.
4. 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.
Usage
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.
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
Contributors
Angel Moya <angel.moya@pesol.es>
Chris Mann <chris.mann@openusersystems.com>
Miquel Alzanillas <miquel.alzanillas@nagarro.com>
Maintainers
This module is maintained by the OCA.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odoo_addon_base_report_to_printer_qztray-19.0.1.0.1.2-py3-none-any.whl.
File metadata
- Download URL: odoo_addon_base_report_to_printer_qztray-19.0.1.0.1.2-py3-none-any.whl
- Upload date:
- Size: 62.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b686872cd2546c4b383422165eaa2c1cbf3fd7f166b253b8f514d97be434d3fb
|
|
| MD5 |
7c2b31f5cb71fbf45220ce64f9a52cd9
|
|
| BLAKE2b-256 |
db1884613492ab2a93e58e481f0727c0f3f45f57c54a1a63deda86ac2ec9ecbc
|