Odoo Community Association

Report to printer CUPS

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

This module extends base_report_to_printer to add support for printing reports through a CUPS server.

It allows users to configure one or more CUPS servers, automatically fetch available printers and trays, and send reports directly to them instead of downloading a PDF.

Main features:

Typical usage:

Table of contents

Installation

To install this module, you need to:

  1. Install PyCups - https://pypi.python.org/pypi/pycups
sudo apt-get install cups
sudo apt-get install libcups2-dev
sudo apt-get install python3-dev
sudo pip install pycups

Configure base_report_to_printer_cups

  1. Go to Settings > Printing > Servers and create a record for your CUPS server (hostname, port, credentials if needed).
  2. Click Update Printers on the server form to load available printers from CUPS.
  3. Set default printers or trays:
    • Globally in Settings > Printing > Reports
    • Per user in User Preferences
    • Per report in Reports configuration
    • Per user and report in Specific report actions per user
  4. Use Print Test Page on a printer form to check connectivity and configuration.

Usage

Guidelines for use:

  • To update the CUPS printers in Settings > Printing > Update Printers from CUPS
  • 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.

When no tray is configured for a report and a user, the default tray setup on the CUPS server is used.

Known issues / Roadmap

  • With threaded printing there’s no download fallback when the issue isn’t detected by the CUPS Odoo backend. To able to do it, we would need to notify the bus or use web_notify for it.

Changelog

13.0.1.0.0 (2019-09-30)

  • [RELEASE] Port from V12.

12.0.1.0.0 (2018-02-04)

  • [RELEASE] Port from V11.

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

  • Agile Business Group & Domsense
  • Pegueroles SCP
  • NaN
  • LasLabs
  • Camptocamp
  • Open for Small Business Ltd

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.