Overview
Users often need a printable copy of the list they are looking at. This module adds Export PDF to the list action menu and opens a dialog to choose the fields. It generates the PDF with QWeb templates, with a separate template for grouped lists. The benefit is a quick printable report from any list without building a custom report.
Usage steps
- 1
Open a list view
The user opens any list view and selects records or leaves the whole list. The cog menu of the list now contains Export PDF. The option is registered through the cogMenu registry.
- Cog menu: Export PDF
- Works on any list
- 2
Pick the fields
A dialog titled Export PDF lets the user choose the fields to include. It has Export and Cancel buttons. The chosen fields become the report columns.
- Buttons: Export, Cancel
- Field selection
- 3
Send data to the controller
The client calls the controller action get_export_data with the model, fields and domain. The controller returns the values ready for the report. Only data the user can read is returned.
- Controller: export_view_pdf
- Respects access rights
- 4
Render the QWeb report
The report action on ir.exports renders one template for plain lists and another for grouped lists. A dedicated Export PDF paper format is used. The PDF downloads in the browser.
- Templates: export_in_pdf, export_in_pdf_group_by
- Paper format: Export PDF
Screens
Illustrative mockups with placeholder data.
Exported list report
selected fields Placeholder value
Grouped export report
group Placeholder value
records Placeholder value
Roles
| Role |
|---|
| All internal users |
Dependencies
Want to know more or try this app? Contact us
We can arrange a demo or a trial and answer your questions about Export View to PDF.