TIP: You can type at any time to perform a new search.

Security findings

Repository
OCA/reporting-engine · module folder · Try on Runboat
Module version
1.0.0
Category
Tools
Folder size
0.1 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/reporting-engine
Last tracking update
2026-10-03 23:38:26
Authors
Odoo Community Association (OCA), Binhex Systems Solutions S.L
Maintainers
Odoo Community Association (OCA), Binhex Systems Solutions S.L
Committers
OCA-git-bot, oca-ci, atg
Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
stock_picking_report_printed_flag
Description
This module provides a generic and extensible configuration layer to mark
records as printed when specific PDF reports are generated.

Main features:

- **Reusable Mixin** (``report.printed.mixin``) that any model can inherit to gain:
  - A ``printed`` Boolean field
  - A ``printed_log_ids`` One2many relation to audit logs
  - A ``printed_report_names`` computed field with printed report names
  - An ``action_view_printed_logs()`` method
- Generic configuration per company and model
- Per-report configuration using rules
- Optional domain conditions per report
- Automatic printed flag update
- Optional logging of report executions
- Optional computation of printed report names
- Full multi-company support with isolated configurations
- User interface for browsing printed report logs

Extension modules simply inherit the mixin:

```python
class AccountMove(models.Model):
    _name = 'account.move'
    _inherit = ['account.move', 'report.printed.mixin']
```

All printed flag functionality is inherited automatically.

Limitations:

- Only applies to QWeb PDF reports (``qweb-pdf``)
- Extension modules must inherit ``report.printed.mixin`` to gain printed field support
- Domain expressions must be valid Python domains

Code Analysis info_outline

Views touched (5)
XML IDNameModelTypeStatus
view_report_printed_config_form report.printed.config.form report.printed.config form New
view_report_printed_config_search report.printed.config.search report.printed.config search New
view_report_printed_config_tree report.printed.config.tree report.printed.config tree New
view_report_printed_log_search report.printed.log.search report.printed.log search New
view_report_printed_log_tree report.printed.log.tree report.printed.log tree New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (11)
  • active Boolean
    default=True
  • allowed_model_ids Many2many → ir.model
    default=<expr> args: 'ir.model'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> ondelete='cascade' required=True
  • display_name Char
    compute='_compute_display_name' store=True
  • line_ids One2many → report.printed.config.line
    string='Report Rules' args: 'report.printed.config.line', 'config_id'
  • model Char
    readonly=True related='model_id.model' store=True string='Technical Model'
  • model_id Many2one → ir.model
    domain="[('transient', '=', False), ('id', 'in', allowed_model_ids)]" ondelete='cascade' required=True args: 'ir.model'
  • name Char
    required=True translate=True
  • note Text
  • report_printed_log_active Boolean
    default=True string='Enable Printed Logs'
  • report_printed_names_active Boolean
    default=True string='Enable Printed Report Names'
Public methods (0)

No public methods.

New fields (3)
  • config_id Many2one → report.printed.config
    ondelete='cascade' required=True args: 'report.printed.config'
  • domain Char
  • report_id Many2one → ir.actions.report
    required=True args: 'ir.actions.report'
Public methods (0)

No public methods.

New fields (6)
  • company_id Many2one → res.company
    required=True args: 'res.company'
  • name Char
    required=True
  • report_id Many2one → ir.actions.report
    ondelete='cascade' required=True args: 'ir.actions.report'
  • res_id Many2oneReference
    index=True model_field='res_model' required=True string='Related Record'
  • res_model Char
    index=True required=True
  • user_id Many2one → res.users
    default=<expr> required=True args: 'res.users'
Public methods (0)

No public methods.

New fields (3)
  • printed Boolean
    copy=False default=False help='Indicates whether at least one configured report has been printed for this record.' index=True
  • printed_log_ids One2many → report.printed.log
    help='Technical relation to printed logs using a generic reference pattern (res_model, res_id). Only logs related to this model type are included.' string='Print Logs' args: 'report.printed.log', 'res_id'
  • printed_report_names Char
    compute='_compute_printed_report_names' help='Comma-separated list of printed report names, computed from related printed logs. Only active if enabled in configuration.' store=True string='Printed Reports Names'
Public methods (1)
  • action_view_printed_logs(self)
    Open a tree view displaying printed logs related to this record. Returns: dict: Standard Odoo action opening ``report.printed.log`` records filtered by this record's (res_model, res_id). Notes: - Uses ensure_one() as the action is record-specific - Designed to be called from UI buttons