TIP: You can type at any time to perform a new search.
Report to printer CUPS
base_report_to_printer_cups · OCA/report-print-send
- Repository
- OCA/report-print-send · module folder · Try on Runboat
- Module version
- 0.2.0
- Category
- Generic Modules/Base
- Folder size
- 0.76 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/report-print-send
- Last tracking update
- 2026-08-07 09:06:23
- Authors
- Camptocamp, Odoo Community Association (OCA), Pegueroles SCP, NaN, Agile Business Group & Domsense, LasLabs, Open for Small Business Ltd
- Maintainers
- Camptocamp, Odoo Community Association (OCA), Pegueroles SCP, NaN, Agile Business Group & Domsense, LasLabs, Open for Small Business Ltd
- Committers
- Weblate, Emanuel Cino, OCA-git-bot, oca-ci, Miquel Alzanillas
- Odoo dependencies
- Python dependencies
- pycups
- System dependencies
- None
- Required by
- None
- Description
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.
Code Analysis ⓘ
Views touched (8)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
printer_update_wizard |
printing.printer.update.wizard | printing.printer.update.wizard | form | New |
printing_job_view_tree_inherit_cups |
printing.job.tree.inherit.cups | printing.job | tree | Inherits base_report_to_printer.printing_job_view_tree |
printing_printer_view_form_inherit_cups |
printing.printer.form (in base_report_to_printer) | printing.printer | form | Inherits base_report_to_printer.printing_printer_view_form |
printing_printer_view_tree_inherit_cups |
printing.printer.tree | printing.printer | tree | Inherits base_report_to_printer.printing_printer_view_tree |
printing_server_cups_view_form |
printing.server.form | printing.server | form | New |
printing_server_view_search |
printing.server.search (in base_report_to_printer) | printing.server | search | New |
printing_server_view_tree |
printing.server.tree (in base_report_to_printer) | printing.server | list | New |
view_printing_job_form_inherit_cups |
printing.job.form.inherit.cups | printing.job | form | Inherits base_report_to_printer.printing_job_view_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (5)
New fields (0)
No new fields.
Public methods (1)-
behaviour(self)
New fields (6)
-
activeBooleandefault=Truehelp='Unchecked if the job is purged from CUPS.' -
job_id_cupsIntegerhelp='CUPS id for this job.'required=Truestring='Job ID' -
job_media_progressIntegerhelp='Percentage of progress for this job.'required=Truestring='Media Progress' -
job_stateSelectionselection_add=[('pending held', 'Pending Held'), ('processing', 'Processing'), ('processing stopped', 'Processing Stopped'), ('canceled', 'Canceled'), ('aborted', 'Aborted')] -
job_state_reasonSelectionhelp='Reason for the current job state.'selection=[('none', 'No reason'), ('aborted-by-system', 'Aborted by the system'), ('compression-error', 'Error in the compressed data'), ('cups-filter-crashed', 'CUPS filter crashed'), ('document-access-error', 'The URI cannot be accessed'), ('document-format-error', 'Error in the document'), ('job-canceled-at-device', 'Cancelled at the device'), ('job-canceled-by-operator', 'Cancelled by the printer operator'), ('job-canceled-by-user', 'Cancelled by the user'), ('job-completed-successfully', 'Completed successfully'), ('job-completed-with-errors', 'Completed with some errors'), ('job-completed-with-warnings', 'Completed with some warnings'), ('job-data-insufficient', 'No data has been received'), ('job-hold-until-specified', 'Currently held'), ('job-incoming', 'Files are currently being received'), ('job-interpreting', 'Currently being interpreted'), ('job-outgoing', 'Currently being sent to the printer'), ('job-printing', 'Currently printing'), ('job-queued', 'Queued for printing'), ('job-queued-for-marker', 'Printer needs ink/marker/toner'), ('job-restartable', 'Can be restarted'), ('job-transforming', 'Being transformed into a different format'), ('printer-stopped', 'Printer is stopped'), ('printer-stopped-partly', "Printer state reason set to 'stopped-partly'"), ('processing-to-stop-point', 'Cancelled, but printing already processed pages'), ('queued-in-device', 'Queued at the output device'), ('resources-are-not-ready', 'Resources not available to print the job'), ('service-off-line', 'Held because the printer is offline'), ('submission-interrupted', 'Files were not received in full'), ('unsupported-compression', 'Compressed using an unknown algorithm'), ('unsupported-document-format', 'Unsupported format')]string='State Reason' -
server_idMany2one → printing.servercomodel_name='printing.server'help='Server which hosts this job.'related='printer_id.server_id'store=Truestring='Server'
-
cancel(self, purge_job=False)
New fields (6)
-
backendSelectionondelete={'cups': 'cascade'}selection_add=[('cups', 'CUPS')] -
input_tray_idsOne2many → printing.tray.inputcomodel_name='printing.tray.input'inverse_name='printer_id'string='Paper Sources' -
job_idsOne2many → printing.jobcomodel_name='printing.job'inverse_name='printer_id'string='Jobs' -
multi_threadBooleancompute='_compute_multi_thread'readonly=Falsestore=True -
output_tray_idsOne2many → printing.tray.outputcomodel_name='printing.tray.output'inverse_name='printer_id'string='Output trays' -
server_idMany2one → printing.servercomodel_name='printing.server'string='Server'
-
cancel_all_jobs(self, purge_jobs=False) -
disable(self) -
enable(self) -
print_file(self, file_name, report=None, **print_opts) -
print_test_page(self)
New fields (0)
No new fields.
Public methods (1)-
action_ok(self)
New fields (9)
-
activeBooleandefault=Truehelp='If checked, this server is useable.' -
addressChardefault='localhost'help='IP address or hostname of the server'required=True -
encryption_policySelectionhelp='Encryption Policy to connect to the server. Empty by default.' args: [('0', 'HTTP_ENCRYPT_IF_REQUESTED'), ('1', 'HTTP_ENCRYPT_NEVER'), ('2', 'HTTP_ENCRYPT_REQUIRED'), ('3', 'HTTP_ENCRYPT_ALWAYS')] -
multi_threadBoolean -
nameChardefault='Localhost'help='Name of the server.'required=True -
passwordCharhelp='Password to connect to the server. Empty by default.' -
portIntegerdefault=631help='Port of the server.'required=True -
printer_idsOne2many → printing.printercomodel_name='printing.printer'help='List of printers available on this server.'inverse_name='server_id'string='Printers List' -
userCharhelp='User name to connect to the server. Empty by default.'
-
action_update_jobs(self) -
action_update_printers(self) -
update_jobs(self, which='all', first_job_id=-1) -
update_printers(self, domain=None, raise_on_error=False)