Repository
OCA/report-print-send · module folder · Try on Runboat
Module version
1.2.2
Category
Generic Modules/Base
Folder size
0.68 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, DavidJForgeFlow, AlexGarS73, eugenio
Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
base_report_to_label_printer, base_report_to_printer_cups, base_report_to_printer_qztray, base_report_to_printer_websocket
Description
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.

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
act_report_xml_view ir.actions.report.form (in base_report_to_printer) ir.actions.report Inherits base.act_report_xml_view
printing_job_view_form printing.job.form (in base_report_to_printer) printing.job form New
printing_job_view_tree printing.job.tree (in base_report_to_printer) printing.job list New
printing_printer_view_form printing.printer.form (in base_report_to_printer) printing.printer form New
printing_printer_view_search printing.printer.search (in base_report_to_printer) printing.printer search New
printing_printer_view_tree printing.printer.tree (in base_report_to_printer) printing.printer list New
printing_report_xml_action_view_form printing.report.xml.action.form (in base_report_to_printer) printing.report.xml.action form New
printing_report_xml_action_view_tree printing.report.xml.action.tree (in base_report_to_printer) printing.report.xml.action list New
view_users_form res.users.form (in base_report_to_printer) res.users form Inherits base.view_users_form
view_users_form_simple_modif res.users.form.simple (in base_report_to_printer) res.users form Inherits base.view_users_form_simple_modif
wizard_print_attachment_form wizard.print.attachment wizard.print.attachment form New
wizard_print_attachment_line_form wizard.print.attachment.line.form wizard.print.attachment.line form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (12)

New fields (5)
  • printer_input_tray_id Many2one → printing.tray.input
    comodel_name='printing.tray.input' domain="[('printer_id', '=', printing_printer_id)]" string='Paper Source'
  • printer_output_tray_id Many2one → printing.tray.output
    comodel_name='printing.tray.output' domain="[('printer_id', '=', printing_printer_id)]" string='Output Bin'
  • printing_action_ids One2many → printing.report.xml.action
    comodel_name='printing.report.xml.action' help='This field allows configuring action and printer on a per user basis' inverse_name='report_id' string='Actions'
  • printing_printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Default Printer'
  • property_printing_action_id Many2one → printing.action
    comodel_name='printing.action' company_dependent=True string='Default Behaviour'
Public methods (7)
  • behaviour(self)
  • onchange_printing_printer_id(self)
    @api.onchange('printing_printer_id')
    Reset the tray when the printer is changed
  • print_action_for_report_name(self, report_name)
    @api.model
    Returns if the action is a direct print or pdf Called from js
  • print_document(self, record_ids, data=None)
    Print a document, do not return the document file
  • print_document_client_action(self, record_ids, data=None)
  • print_document_threaded(self, report_id, record_ids, data)
  • report_action(self, docids, data=None, config=True)

New fields (2)
  • action_type Selection
    required=True selection=_available_action_types string='Type'
  • name Char
    required=True
Public methods (0)

No public methods.

New fields (6)
  • job_state Selection
    help='Current state of the job.' selection=[('pending', 'Pending'), ('completed', 'Completed'), ('unknown', 'Unknown')] string='State'
  • name Char
    help='Job name.'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used for this job.' ondelete='cascade' required=True string='Printer'
  • time_at_completed Datetime
    help='Date and time of completion for this job.' string='Completion Date'
  • time_at_creation Datetime
    help='Date and time of creation of this job.' required=True string='Creation Date'
  • time_at_processing Datetime
    help='Date and time of process for this job.' string='Processing Date'
Public methods (2)
  • action_cancel(self)
  • cancel(self)

New fields (11)
  • active Boolean
    default=True
  • backend Selection
    default='base' required=True selection=[('base', 'Base')]
  • default Boolean
    readonly=True
  • location Char
    readonly=True
  • model Char
    readonly=True
  • multi_thread Boolean
  • name Char
    required=True
  • status Selection
    default='unknown' readonly=True required=True selection=[('unavailable', 'Unavailable'), ('printing', 'Printing'), ('unknown', 'Unknown'), ('available', 'Available'), ('error', 'Error'), ('server-error', 'Server Error')]
  • status_message Char
    readonly=True
  • system_name Char
    required=True
  • uri Char
    readonly=True string='URI'
Public methods (11)
  • action_cancel_all_jobs(self)
  • cancel_all_jobs(self, purge_jobs=False)
  • disable(self)
  • enable(self)
  • get_default(self)
  • print_document(self, report, content, action=None, doc_format='qweb-pdf', **kwargs)
    Generic document print logic, backend-agnostic.
  • print_file(self, file_name, report=None, **print_opts)
  • print_options(self, report=None, **print_opts)
  • print_test_page(self)
  • set_default(self)
  • unset_default(self)

New fields (0)

No new fields.

Public methods (1)
  • action_ok(self)

New fields (7)
  • action Selection
    required=True selection=<expr>
  • active Boolean
    default=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Printer'
  • printer_input_tray_id Many2one → printing.tray.input
    comodel_name='printing.tray.input' domain="[('printer_id', '=', printer_id)]" string='Paper Source'
  • printer_output_tray_id Many2one → printing.tray.output
    comodel_name='printing.tray.output' domain="[('printer_id', '=', printer_id)]" string='Output Bin'
  • report_id Many2one → ir.actions.report
    comodel_name='ir.actions.report' ondelete='cascade' required=True string='Report'
  • user_id Many2one → res.users
    comodel_name='res.users' ondelete='cascade' required=True string='User'
Public methods (2)
  • behaviour(self)
  • onchange_printer_id(self)
    @api.onchange('printer_id')
    Reset the tray when the printer is changed

New fields (3)
  • name Char
    required=True
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' ondelete='cascade' readonly=True required=True string='Printer'
  • system_name Char
    readonly=True required=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • printer_input_tray_id Many2one → printing.tray.input
    comodel_name='printing.tray.input' domain="[('printer_id', '=', printing_printer_id)]" string='Default Printer Paper Source'
  • printer_output_tray_id Many2one → printing.tray.output
    comodel_name='printing.tray.output' domain="[('printer_id', '=', printing_printer_id)]" string='Default Printer Output Bin'
  • printing_action Selection
    selection=<expr>
  • printing_printer_id Many2one → printing.printer
    comodel_name='printing.printer' string='Default Printer'
Public methods (3)
  • SELF_READABLE_FIELDS(self)
    @property
  • SELF_WRITEABLE_FIELDS(self)
    @property
  • onchange_printing_printer_id(self)
    @api.onchange('printing_printer_id')
    Reset the tray when the printer is changed

New fields (2)
  • attachment_line_ids One2many → wizard.print.attachment.line
    string='Attachments to print' args: 'wizard.print.attachment.line', 'wizard_id'
  • printer_id Many2one → printing.printer
    comodel_name='printing.printer' help='Printer used to print the attachments.' required=True string='Printer'
Public methods (1)
  • print_attachments(self)
    Prints a label per selected record

New fields (4)
  • attachment_id Many2one → ir.attachment
    domain=['|', ('mimetype', '=', 'application/pdf'), ('mimetype', '=', 'application/octet-stream')] required=True args: 'ir.attachment'
  • copies Integer
    default=1
  • record_name Char
    readonly=True related='attachment_id.res_name'
  • wizard_id Many2one → wizard.print.attachment
    args: 'wizard.print.attachment'
Public methods (1)
  • get_format(self)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…