Skip to main content

Report to QZ Tray

Project description

Odoo Community Association

Report to QZ Tray

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

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:

https://qz.io/download/

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:

  1. Open the QZ Tray menu.

  2. Go to Advanced → Site Manager.

  3. Drag and drop the cert.pem file into the Site Manager.

  4. 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
  1. Go to Settings → Technical → Printing → Printers.

  2. Click Create (or open an existing printer).

  3. 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.



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

Authors

  • PESOL

  • Nagarro

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

If you're not sure about the file name format, learn more about wheel file names.

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

File hashes

Hashes for odoo_addon_base_report_to_printer_qztray-19.0.1.0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b686872cd2546c4b383422165eaa2c1cbf3fd7f166b253b8f514d97be434d3fb
MD5 7c2b31f5cb71fbf45220ce64f9a52cd9
BLAKE2b-256 db1884613492ab2a93e58e481f0727c0f3f45f57c54a1a63deda86ac2ec9ecbc

See more details on using hashes here.

Supported by

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