@@ -11,7 +11,7 @@ Report to printer
1111 !! This file is generated by oca-gen-addon-readme !!
1212 !! changes will be overwritten. !!
1313 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14- !! source digest: sha256:411351c67395d3219ea49f07addba2966080696f3b776d899712288e24f98fc2
14+ !! source digest: sha256:e5af916528d668b5628606b5b2216ec40d3f05f183d01eb157311e01719dcb49
1515 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1616
1717.. |badge1 | image :: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -32,33 +32,32 @@ Report to printer
3232
3333|badge1 | |badge2 | |badge3 | |badge4 | |badge5 |
3434
35- This module allows users to send reports to a printer attached to the
36- server.
35+ This module provides the core framework to send Odoo reports directly to
36+ printers. It defines the base models, configuration options and printing
37+ workflow, without depending on a specific printing protocol.
3738
38- It adds an optional behaviour on reports to send it directly to a
39- printer.
39+ The actual connection with printers is delegated to extension modules
40+ (e.g. base_report_to_printer_cups), which implement support for a given
41+ printing backend.
4042
41- - Send to Client is the default behaviour providing you a downloadable
42- PDF
43- - Send to Printer prints the report on selected printer
43+ Key features:
4444
45- It detects trays on printers installation plus permits to select the
46- paper source on which you want to print directly.
45+ Flexible report output behavior:
4746
48- Report behaviour is defined by settings .
47+ Send to Client (default): generates a downloadable PDF .
4948
50- You will find this option on default user config, on default report
51- config and on specific config per user per report .
49+ Send to Printer: sends the report directly to a configured printer (via
50+ backend module) .
5251
53- This allows you to dedicate a specific paper source for example for
54- preprinted paper such as payment slip .
52+ Support for user-level, report-level, and combined user/report printing
53+ rules .
5554
56- Settings can be configured:
55+ Extensible design: new modules can add support for additional printing
56+ systems or protocols.
5757
58- - globally
59- - per user
60- - per report
61- - per user and report
58+ This modular approach allows administrators to configure printing
59+ globally, per user, per report, or per user/report combination, while
60+ keeping the printing backend independent and replaceable.
6261
6362**Table of contents **
6463
@@ -68,64 +67,138 @@ Settings can be configured:
6867Installation
6968============
7069
71- To install this module, you need to:
7270
73- 1. Install PyCups - https://pypi.python.org/pypi/pycups
74-
75- .. code :: bash
76-
77- sudo apt-get install cups
78- sudo apt-get install libcups2-dev
79- sudo apt-get install python3-dev
80- sudo pip install pycups
8171
8272Configuration
8373=============
8474
85- To configure this module, you need to:
75+ Configuration Guide
76+
77+ To configure and start using the Base Report to Printer module, follow
78+ these steps:
79+
80+ 1. User Access Rights
81+
82+ Go to Settings → Users & Companies → Users.
83+
84+ Open the user form and in the Access Rights tab, enable:
85+
86+ Printing / Print User → grants access to the printing menu and
87+ user-specific printing preferences.
88+
89+ 2. Global Printing Settings
90+
91+ Navigate to Settings → Technical → Printing → Printing Settings.
92+
93+ Define the default printing behavior for reports:
94+
95+ Send to Client (default): generates a downloadable PDF.
96+
97+ Send to Printer: sends the report directly to a configured printer
98+ (requires a backend module such as base_report_to_printer_cups).
99+
100+ 3. User Preferences
101+
102+ Each user can configure their own printing behavior:
103+
104+ Go to Preferences (top-right menu, click on your name).
105+
106+ In the Printing section, choose:
107+
108+ Default action (Send to Client / Send to Printer).
109+
110+ Preferred printer (if a backend module is installed and printers are
111+ detected).
112+
113+ 4. Report-Specific Configuration
114+
115+ Go to Settings → Technical → Reports → Reports.
116+
117+ For each report, you can define:
86118
87- 1. Enable the "Printing / Print User" option under access rights to give
88- users the ability to view the print menu.
119+ Default printing action.
89120
90- The jobs will be sent to the printer with a name matching the
91- print_report_name of the report (truncated at 80 characters). By default
92- this will not be displayed by CUPS web interface or in Odoo. To see this
93- information, you need to change the configuration of your CUPS server
94- and set the JobPrivateValue directive to "none" (or some other list of
95- values which does not include "job-name") , and reload the server. See
96- cupsd.conf(5)
97- <`https://www.cups.org/doc/man-cupsd.conf.html\\ > <https://www.cups.org/doc/man-cupsd.conf.html\> >`__
98- for details.
121+ Default printer (if available).
122+
123+ These settings can be overridden at the user level.
124+
125+ 5. Per User & Report Combination
126+
127+ Navigate to Settings → Technical → Printing → Report Configurations.
128+
129+ Here you can assign specific rules combining:
130+
131+ A user.
132+
133+ A report.
134+
135+ A printing action (Send to Client / Send to Printer).
136+
137+ A printer and tray (if supported by the backend).
138+
139+ 6. Installing a Backend (e.g., CUPS)
140+
141+ The base module does not include any printing backend. To connect with
142+ actual printers you must install an extension module, such as:
143+
144+ base_report_to_printer_cups → adds support for CUPS printers, trays, and
145+ job management.
146+
147+ Once installed, printers from the backend will be available in the
148+ configuration menus above.
99149
100150Usage
101151=====
102152
103- Guidelines for use:
153+ Usage
154+ =====
104155
105- - To update the CUPS printers in *Settings > Printing > Update
106- Printers from CUPS *
107- - To print a report on a specific printer or tray, you can change
108- these in *Settings > Printing > Reports * to define default
109- behaviour.
110- - To print a report on a specific printer and/or tray for a user, you
111- can change these in *Settings > Printing > Reports * in *Specific
112- actions per user *
113- - Users may also select a default action, printer or tray in their
114- preferences.
156+ Guidelines for use:
115157
116- When no tray is configured for a report and a user, the default tray
117- setup on the CUPS server is used.
158+ - To use a specific printing backend (e.g. CUPS), make sure the
159+ corresponding module (such as ``base_report_to_printer_cups ``) is
160+ installed and configured.
161+ - To print a report on a specific printer or tray, you can configure
162+ defaults in *Settings > Printing > Reports *.
163+ - To define user-specific behaviour, go to *Settings > Printing >
164+ Reports * and configure *Specific actions per user *.
165+ - Each user can also select a default action, printer or tray in their
166+ *Preferences *.
167+ - When no tray is configured for a report or a user, the default tray
168+ defined by the printing backend (e.g. the CUPS server) will be used.
169+
170+ Notes
171+ -----
172+
173+ - This module (``base_report_to_printer ``) only provides the **base
174+ framework **.
175+ - To connect with a real print system, you must install an additional
176+ backend module (e.g. ``base_report_to_printer_cups `` for CUPS).
177+ - Other backend modules can be developed to support different print
178+ protocols or environments.
118179
119180Known issues / Roadmap
120181======================
121182
122- - With threaded printing there's no download fallback when the issue
123- isn't detected by the CUPS Odoo backend. To able to do it, we would
124- need to notify the bus or use web_notify for it.
183+
125184
126185Changelog
127186=========
128187
188+ 18.0.1.0.0 (2025-10-15)
189+ -----------------------
190+
191+ - [REFAC] Extracted all CUPS-specific functionality into a dedicated
192+ module: ``base_report_to_printer_cups ``.
193+ - [ADD] Introduced a base abstraction layer for report-to-printer, to
194+ allow adding new backends (protocols) without modifying the core
195+ module.
196+ - [IMP] Improved configuration instructions (global, per-user,
197+ per-report, and per user+report).
198+ - [CLEAN] Updated documentation and module description to reflect new
199+ architecture.
200+ -
201+
12920213.0.1.0.0 (2019-09-30)
130203-----------------------
131204
@@ -180,12 +253,13 @@ Contributors
180253- Akim Juillerat <
[email protected] >
181254- Jacques-Etienne Baudoux (BCIM) <
[email protected] >
182255256+ - Miquel Alzanillas <
[email protected] >
183257
184258Other credits
185259-------------
186260
187- The migration of this module from 17.0 to 18.0 was financially supported
188- by Camptocamp.
261+ The migration of the original module (base_report_to_printer) from 17.0
262+ to 18.0 was financially supported by Camptocamp.
189263
190264Maintainers
191265-----------
0 commit comments