Metadata-Version: 2.1
Name: odoo-addon-base_report_to_printer_cups
Version: 19.0.0.1.0.3
Requires-Dist: odoo-addon-base_report_to_printer==19.0.*
Requires-Dist: odoo==19.0.*
Requires-Dist: pycups
Summary: Report to printer CUPS
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 CUPS
======================

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

.. |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_cups
    :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_cups
    :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 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:

- Manage CUPS servers from the Odoo backend.
- Synchronize available printers and trays with CUPS.
- Define default printing behavior globally, per user, per report, or
  per user and report.
- Test printer connectivity with a **Print Test Page** action.

Typical usage:

- Send reports directly to CUPS printers.
- Configure dedicated trays for pre-printed forms such as payment slips.
- Allow each user to define their own default printer preferences.

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

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 <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_cups%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>
- 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_cups>`_ project on GitHub.

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