OCA/report-print-send · 19.0
Report to printer via WebSocket
base_report_to_printer_websocket
Report to printer via WebSocket
This module extends base_report_to_printer to send print jobs through the Odoo Bus (WebSocket) instead of a traditional print server like CUPS.
When a report is printed, the module encodes the rendered PDF in Base64
and sends a print_job message through the bus to the user configured
on the printer. A client-side listener running as that user receives the
payload and forwards it to the local printer.
Main features:
- No external print server required — works over the existing Odoo Bus.
- Sends print jobs as Base64-encoded PDFs via WebSocket.
- Each printer is bound to a specific Odoo user, so jobs are delivered only to the right client-side agent.
- Compatible with the standard base_report_to_printer configuration (global, per user, per report, per user + report).
- Works with
odoo-print-client <https://pypi.org/project/odoo-print-client/>_ as the client-side agent to receive and print jobs.
Table of contents
Configuration
-
Create a printer record in Settings > Printing > Printers with the backend set to WebSocket.
-
Set the System Name to the name of the target printer as known by the client-side listener (e.g.
MFC-L3750CDW). Leave it empty to use the default system printer. -
Set the WebSocket User to the Odoo user that will run the
odoo-print-clientagent. Print jobs are delivered through the bus subscription of this user. -
Assign the printer as the default globally, per user, or per report following the standard base_report_to_printer workflow.
-
Install and run the
odoo-print-clientagent on the machine connected to the printerpip install odoo-print-client odoo-printer --url "https://odoo.example.com" --db "prod" --user "admin" --password "admin"See
odoo-print-client on PyPI <https://pypi.org/project/odoo-print-client/>_ for full configuration options.
Usage
Once configured, printing works transparently. When a user prints a report that is set to Send to Printer and the assigned printer uses the WebSocket backend, the module will:
-
Render the report as PDF.
-
Encode the PDF content in Base64.
-
Send a
print_jobmessage through the bus to the printer's configured user with the following payload{ "printer_name": "<system_name of the printer>", "file_data": "<base64-encoded PDF>" }
The recommended client-side agent is
odoo-print-client <https://pypi.org/project/odoo-print-client/>_,
which connects as the configured user and forwards jobs to the local
printer.
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
- ForgeFlow
- Dixmit
Contributors
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>.





