| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 121 |
| Technical Name |
no_pdf_preview_print |
| License | LGPL-3 |
| Website | https://www.oudayet.com |
| Versions | 16.0 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 121 |
| Technical Name |
no_pdf_preview_print |
| License | LGPL-3 |
| Website | https://www.oudayet.com |
| Versions | 16.0 17.0 18.0 19.0 |
PDF Preview Before Print
A full-screen preview dialog for every Odoo PDF report - print, download, or close after a quick review
Odoo 19 FREE Zero ConfigPrint First, Look Later?
In standard Odoo, clicking Print downloads the PDF immediately. Wrong template, blank page, or batch error - you only find out after the file is on disk or the paper is in the tray.
Without this module
Click Print -> PDF lands in your Downloads folder. No second chance to spot a mistake before it's already saved or printed.
With this module
A clean dialog opens first. Scroll the PDF, then choose Print, Download, or Close - with one keystroke if you prefer.
Four Things It Does Well
Lightweight, focused, no configuration.
An OWL Dialog renders the full PDF in an iframe. Scroll multi-page documents without leaving Odoo.
One click or press P to send the PDF straight to the system print dialog. No round-trip via Downloads.
Press D or click Download to save the PDF only after confirming the content looks right.
P Print ยท D Download ยท Esc Close. Power users never need the mouse.
Works on single records and batch (list view multi-select) - no extra config.
Real-World Scenarios
Accounting prints an invoice to mail. The preview catches the wrong template, a missing logo, or a stale tax line - before the customer ever sees it.
HR previews each payslip before download. Spotting a blank page or a wrong period saves a hand-written apology email later.
Selecting 30 quotations from list view? Preview shows the merged PDF in one scroll - so a missing record or mis-rendered page never makes it to the printer.
Building a custom QWeb report? Iterate without 30 stray PDFs piling up in your Downloads folder. Close the dialog and try again.
How It Works
Use Odoo's normal Print button on any record or list-view selection. No new menu, no special action.
A full-screen OWL dialog appears with the PDF rendered in an iframe. The download is paused.
Print (P), Download (D), or Close (Esc). The original action only fires when you say so.
Installation
Two steps. No Python dependencies, no database changes, no configuration.
Step 1 - addons path
Drop the module inPlace the no_pdf_preview_print folder in any directory listed in your Odoo addons_path.
Step 2 - in Odoo
Install the moduleApps menu โ remove the Apps filter โ search "PDF Preview Before Print" โ Install. From the next print onwards, every QWeb PDF report opens in a preview dialog.
Works With Every QWeb PDF Report
No allow-list. No per-report setup. The handler intercepts every qweb-pdf action.
Non-PDF report types (XLSX, CSV, HTML, text) are not intercepted - the handler returns false and Odoo's default behaviour resumes.
What This Module Doesn't Do
Honest scope. Here's what's out of reach.
XLSX, CSV, HTML, and text reports pass through unchanged. The handler only catches qweb-pdf.
When Odoo attaches a report to an outgoing email, no UI is involved - the preview only fires for interactive Print actions.
The preview applies to all users. There's no per-user toggle to bypass it (a power user can still hit D immediately).
This is a viewer, not an editor. Use a real PDF tool if you need to mark-up, sign, or comment on the document.
The dialog itself is in-app, but the print step calls iframe.contentWindow.print(). Aggressive browser settings can block the system print prompt - D always works as a fallback.
Inline iframe PDF rendering varies by mobile browser. On limited platforms the user can still tap Download to fetch the file.
๐ก A Note on Iframe PDF Rendering
The preview is rendered by the browser's built-in PDF viewer inside an iframe. Behaviour - zoom, scroll, print button, font fallbacks - therefore depends on the browser, not on Odoo. Chrome, Edge, and Firefox on desktop all render Odoo's QWeb PDFs reliably. On Safari and most mobile browsers, the in-page viewer is more limited; the module always offers a Download fallback so the user can open the file in their system PDF reader instead. If your fleet is locked down with strict iframe or pop-up policies, test once before rolling out company-wide.
FAQ
No. The PDF is rendered exactly once by Odoo's normal pipeline; the dialog just shows it before the download fires. The only added cost is the iframe load - a few hundred milliseconds at most.
The handler is global per Odoo session. There's no per-report opt-out today; if you need one report to skip the preview, fork the handler in your custom module and check action.report_name.
Yes. The handler reads active_ids from the action context, so multi-record batches render as a single merged PDF in the same preview dialog.
This branch targets Odoo 19. The handler hooks into the v19 "ir.actions.report handlers" registry, which differs across versions. Earlier-version branches will follow if there's demand.
No. PDF Password Protection encrypts the rendered PDF server-side; this module only affects the client-side download UX. Stack them freely.
It hooks the public "ir.actions.report handlers" registry. As long as that registry exists in the same form, the module will keep working. Each version branch ships its own JS test suite to catch regressions.
Technical Details
ir.actions.report handlers registry
PDF Preview Before Print - Free, open source, Odoo 19
ยฉ Naim OUDAYET - LGPL-3 License
Please log in to comment on this module