Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 174 additions & 0 deletions pos_printing_qztray/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===============
POS Printing QZ
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:68e17147c1e7faf5af8e7828307f92c4d60fcc4e3149d420bf727daf51b96d44
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/19.0/pos_printing_qztray
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-19-0/pos-19-0-pos_printing_qztray
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides a pure-software alternative to the Odoo IoT Box for
thermal receipt printing in the Point of Sale, using [QZ
Tray](https://qz.io/) as the print driver.

It extends base_report_to_printer_qz — 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.

Key features:

- **Server-side ESC/POS receipt template**: a full receipt template in
controllers/main.py generates ESC/POS commands 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**: the cash drawer open command (ESC p) is sent
automatically after each receipt print.
- **No IoT Box required**: designed as a software-only alternative for
setups where deploying IoT infrastructure is not desirable.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

Installation
============

This module requires the following non-Python dependency:

- [QZ Tray](https://qz.io/) must be installed and running on the client
machine that operates the POS.

Odoo module dependency (must be installed first):

- base_report_to_printer_qz — provides the QZ Tray printer backend and
the printing.printer model with backend = qztray support.

Python dependencies (installed automatically via external_dependencies):

- python-escpos

Configuration
=============

To configure this module, you need to:

1. Install and launch the [QZ Tray](https://qz.io/) desktop application
on the machine where the thermal printer is connected.
2. In Odoo, go to *Point of Sale* > *Configuration* > *Settings*.
3. Select your POS configuration and enable **QZ Tray Printing**.
4. Optionally select a **QZ Tray Printer** from the list — only printers
with backend = qztray (managed by base_report_to_printer_qz) are
shown. If left empty, QZ Tray will use the system default printer.
5. Save the settings and open the POS session.

To extend or customise the receipt template, inherit PosEscposController
in your own module and override the relevant \_get\_\* methods (e.g.
\_get_header, \_get_order_lines). No frontend changes are required.

Usage
=====

To use this module, you need to:

1. Open a POS session that has **QZ Tray Printing** enabled.
2. Make sure the QZ Tray desktop application is running on the POS
machine.
3. Process a sale and click **Payment** to print the receipt.

The receipt is sent directly to the thermal printer via QZ Tray using
ESC/POS commands generated server-side. The cash drawer is opened
automatically after each print.

If the order cannot be matched (e.g. when reprinting from the *Ticket
Screen*), the module falls back to rendering the standard HTML receipt
as a PNG image and converting it to ESC/POS format.

No IoT Box or network printer configuration is required.

Known issues / Roadmap
======================



Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/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 <https://github.com/OCA/pos/issues/new?body=module:%20pos_printing_qztray%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* APSL Nagarro

Contributors
------------

- Miquel Alzanillas <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-miquelalzanillas| image:: https://github.com/miquelalzanillas.png?size=40px
:target: https://github.com/miquelalzanillas
:alt: miquelalzanillas

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-miquelalzanillas|

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/19.0/pos_printing_qztray>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions pos_printing_qztray/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import controllers
31 changes: 31 additions & 0 deletions pos_printing_qztray/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2026 Miquel Alzanillas <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "POS Printing QZ",
"summary": "POS receipt printing via QZ Tray",
"version": "19.0.1.0.0",
# see https://odoo-community.org/page/development-status
"development_status": "Alpha",
"category": "Point Of Sale",
"website": "https://github.com/OCA/pos",
"author": "APSL Nagarro, Odoo Community Association (OCA)",
"maintainers": ["miquelalzanillas"],
"license": "AGPL-3",
"application": False,
"installable": True,
"external_dependencies": {"python": ["python-escpos"]},
"depends": [
"point_of_sale",
"base_report_to_printer_qztray",
],
"data": [
"views/pos_config_views.xml",
],
"assets": {
"point_of_sale._assets_pos": [
"pos_printing_qztray/static/src/app/printer/qz_tray_connection.esm.js",
"pos_printing_qztray/static/src/app/printer/qz_tray_printer.esm.js",
"pos_printing_qztray/static/src/app/services/qz_tray_printer_service.esm.js",
],
},
}
3 changes: 3 additions & 0 deletions pos_printing_qztray/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import main
Loading
Loading