Metadata-Version: 2.1
Name: odoo-addon-base_report_to_printer
Version: 19.0.1.2.0.2
Requires-Dist: odoo==19.0.*
Summary: Report to printer
Home-page: https://github.com/OCA/report-print-send
License: AGPL-3
Author: Agile Business Group & Domsense, Pegueroles SCP, NaN, LasLabs, Camptocamp, Odoo Community Association (OCA), Open for Small Business Ltd
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 19.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

=================
Report to printer
=================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |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%2Freport--print--send-lightgray.png?logo=github
    :target: https://github.com/OCA/report-print-send/tree/19.0/base_report_to_printer
    :alt: OCA/report-print-send
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/report-print-send-19-0/report-print-send-19-0-base_report_to_printer
    :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/report-print-send&target_branch=19.0
    :alt: Try me on Runboat

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

This module provides the core framework to send Odoo reports directly to
printers. It defines the base models, configuration options and printing
workflow, without depending on a specific printing protocol.

The actual connection with printers is delegated to extension modules
(e.g. base_report_to_printer_cups), which implement support for a given
printing backend.

Key features:

Flexible report output behavior:

Send to Client (default): generates a downloadable PDF.

Send to Printer: sends the report directly to a configured printer (via
backend module).

Support for user-level, report-level, and combined user/report printing
rules.

Extensible design: new modules can add support for additional printing
systems or protocols.

This modular approach allows administrators to configure printing
globally, per user, per report, or per user/report combination, while
keeping the printing backend independent and replaceable.

**Table of contents**

.. contents::
   :local:

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

To install this module, you need to:

1. Install PyCups - https://pypi.python.org/pypi/pycups

.. code:: bash

   sudo apt-get install cups
   sudo apt-get install libcups2-dev
   sudo apt-get install python3-dev
   sudo pip install pycups

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

Configuration Guide

To configure and start using the Base Report to Printer module, follow
these steps:

1. User Access Rights

Go to Settings → Users & Companies → Users.

Open the user form and in the Access Rights tab, enable:

Printing / Print User → grants access to the printing menu and
user-specific printing preferences.

2. Global Printing Settings

Navigate to Settings → Technical → Printing → Printing Settings.

Define the default printing behavior for reports:

Send to Client (default): generates a downloadable PDF.

Send to Printer: sends the report directly to a configured printer
(requires a backend module such as base_report_to_printer_cups).

3. User Preferences

Each user can configure their own printing behavior:

Go to Preferences (top-right menu, click on your name).

In the Printing section, choose:

Default action (Send to Client / Send to Printer).

Preferred printer (if a backend module is installed and printers are
detected).

4. Report-Specific Configuration

Go to Settings → Technical → Reports → Reports.

For each report, you can define:

Default printing action.

Default printer (if available).

These settings can be overridden at the user level.

5. Per User & Report Combination

Navigate to Settings → Technical → Printing → Report Configurations.

Here you can assign specific rules combining:

A user.

A report.

A printing action (Send to Client / Send to Printer).

A printer and tray (if supported by the backend).

6. Installing a Backend (e.g., CUPS)

The base module does not include any printing backend. To connect with
actual printers you must install an extension module, such as:

base_report_to_printer_cups → adds support for CUPS printers, trays, and
job management.

Once installed, printers from the backend will be available in the
configuration menus above.

Usage
=====

Usage
=====

Guidelines for use:

- To use a specific printing backend (e.g. CUPS), make sure the
  corresponding module (such as ``base_report_to_printer_cups``) is
  installed and configured.
- To print a report on a specific printer or tray, you can configure
  defaults in *Settings > Printing > Reports*.
- To define user-specific behaviour, go to *Settings > Printing >
  Reports* and configure *Specific actions per user*.
- Each user can also select a default action, printer or tray in their
  *Preferences*.
- When no tray is configured for a report or a user, the default tray
  defined by the printing backend (e.g. the CUPS server) will be used.

Notes
-----

- This module (``base_report_to_printer``) only provides the **base
  framework**.
- To connect with a real print system, you must install an additional
  backend module (e.g. ``base_report_to_printer_cups`` for CUPS).
- Other backend modules can be developed to support different print
  protocols or environments.

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
=========

19.0.1.0.0 (2025-12-18)
-----------------------

- [REF] Extracted all CUPS-specific functionality into a dedicated
  module: ``base_report_to_printer_cups``.
- [ADD] Introduced a base abstraction layer for report-to-printer, to
  allow adding new backends (protocols) without modifying the core
  module.
- [IMP] Improved configuration instructions (global, per-user,
  per-report, and per user+report).
- [CLEAN] Updated documentation and module description to reflect new
  architecture.
- 

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 <https://github.com/OCA/report-print-send/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/report-print-send/issues/new?body=module:%20base_report_to_printer%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
-------

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

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

- Ferran Pegueroles <ferran@pegueroles.com>
- Albert Cervera i Areny <albert@nan-tic.com>
- Davide Corio <davide.corio@agilebg.com>
- Lorenzo Battistini <lorenzo.battistini@agilebg.com>
- Yannick Vaucher <yannick.vaucher@camptocamp.com>
- Lionel Sausin <ls@numerigraphe.com>
- Guewen Baconnier <guewen.baconnier@camptocamp.com>
- Dave Lasley <dave@laslabs.com>
- Sylvain Garancher <sylvain.garancher@syleam.fr>
- Jairo Llopis <jairo.llopis@tecnativa.com>
- Graeme Gellatly <graeme@o4sb.com>
- Rod Schouteden <rod@schout-it.be>
- Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
- Matias Peralta <mnp@adhoc.com.ar>
- Hughes Damry <hughes.damry@acsone.eu>
- Akim Juillerat <akim.juillerat@camptocamp.com>
- Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
- Tris Doan <tridm@trobz.com>
- Sergij Pfaifer <s.pfaifer@deinetuer.de>
- Miquel Alzanillas <miquel.alzanillas@nagarro.com>

Other credits
-------------



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.

This module is part of the `OCA/report-print-send <https://github.com/OCA/report-print-send/tree/19.0/base_report_to_printer>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
