Skip to main content
Odoo Community Association

Report to printer via WebSocket

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

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

  1. Create a printer record in Settings > Printing > Printers with the backend set to WebSocket.

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

  3. Set the WebSocket User to the Odoo user that will run the odoo-print-client agent. Print jobs are delivered through the bus subscription of this user.

  4. Assign the printer as the default globally, per user, or per report following the standard base_report_to_printer workflow.

  5. Install and run the odoo-print-client agent on the machine connected to the printer

    pip 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:

  1. Render the report as PDF.

  2. Encode the PDF content in Base64.

  3. Send a print_job message 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.

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.

Metadata

Release files for odoo-addon-base-report-to-printer-websocket 19.0.1.0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-base-report-to-printer-websocket 19.0.1.0.0.8
File Interpreter ABI Platform Actions
odoo_addon_base_report_to_printer_websocket-19.0.1.0.0.8-py3-none-any.whl Python 3 none any Details for odoo_addon_base_report_to_printer_websocket-19.0.1.0.0.8-py3-none-any.whl

Release files / odoo_addon_base_report_to_printer_websocket-19.0.1.0.0.8-py3-none-any.whl

Download URL odoo_addon_base_report_to_printer_websocket-19.0.1.0.0.8-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da41a17d45e3648cd59ddc65b40fd9b15d64c9d3f26219cde85f79d052efb0fd
BLAKE2b-256 checksum
How to use checksums
e60d2c5672d032b93eabb3a17b3647668b7bc6bbde4bb1eeebaa78022e0eda7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for odoo-addon-base-report-to-printer-websocket 19.0.1.0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page