Skip to content

Conversation

nicolas-delbovier-acsone
Copy link

@nicolas-delbovier-acsone nicolas-delbovier-acsone commented Aug 29, 2025

In the case of a report of type "qweb-text" set to "Send to printer" (e.g. a zpl report), the pervious implementation was triggering a download of the report.

This is because inside the base odoo report handling function (odoo/addons/web/static/src/webclient/actions/action_service.js -> _executeReportAction), the code defaults to 'download' for text reports that have not been dealt with and current implementation only deals with "qweb-pdf" reports.
However, the supported types defined inside REPORT_TYPES are ["qweb-pdf", "qweb-text"].

Thus, the current approach now creates a new computed field is_report_to_printer_action (to replace the previous hard-coded solution) to deal with the logic of ensuring the report is of the expected type before triggering our custom action handler.

@nicolas-delbovier-acsone nicolas-delbovier-acsone changed the title [FIX] base_report_to_printer: do not download text report sent to printer [16.0][FIX] base_report_to_printer: do not download text report sent to printer Aug 29, 2025
@nicolas-delbovier-acsone nicolas-delbovier-acsone force-pushed the 16.0-fix-base_report_to_printer-dont-download-text-report-sent-to-printer-nde branch 2 times, most recently from 1fdec0d to be89501 Compare August 29, 2025 14:10
…nter

In the case of a report of type "qweb-text" set to "Send to printer" (e.g. a zpl report), the pervious implementation was triggering a download of the report.

This is because inside the base odoo report handling function (odoo/addons/web/static/src/webclient/actions/action_service.js -> `_executeReportAction`), the code defaults to 'download' for text reports that have not been dealt with and current implementation only deals with "qweb-pdf" reports.
However, the supported types defined inside `REPORT_TYPES` are ["qweb-pdf", "qweb-text"].

Thus, the current approach now creates a new computed field `is_report_to_printer_action` (to replace the previous hard-coded solution) to deal with the logic of ensuring the report is of the expected type before triggering our custom action handler.
@nicolas-delbovier-acsone nicolas-delbovier-acsone force-pushed the 16.0-fix-base_report_to_printer-dont-download-text-report-sent-to-printer-nde branch from be89501 to cc915c3 Compare August 29, 2025 14:12
Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit. Thanks!

@rousseldenis rousseldenis added this to the 16.0 milestone Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants