Custom report filenames

by ,
Odoo
v 8.0 v 9.0 Third Party 3042
Download for v 8.0
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Social Network (mail)
Technical Name report_custom_filename
LicenseAGPL-3
Versions 9.0 8.0
You bought this module and need support? Click here!

Custom report filenames

This addon allows for custom filenames for reports.

Configuration

To configure this module, open the report whose filename you want to change and fill in the Download filename field. This field is evaluated as jinja2 template with objects being a list of browse records of the records to print, and o the first record. If your model contains a name field, you might write something like ${o.name}_report.pdf as filename.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.

Try me on Runbot

Credits

Contributors

Icon

Icon courtesy of http://www.picol.org/ (download_settings.svg)

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Cool
by
M F
on 11/1/16, 7:02 AM

My invoice filename gets nicely rendered after putting ${ o.internal_number + o.partner_id | replace("res.partner","-") | replace("(","") | replace(")","") | replace(",","") }_Invoice into the 'Download filename' field under Actions / Reports / Invoices


Great work!
by
Víctor Genero Otaño
on 6/27/16, 9:37 AM

Excellent idea, but still have a problem when I declare the "download_filename" in the XML action for report, I get an error telling me that attribute does not exist. What should I do? I don´t want to manually set it from Odoo UI. I tried to inherit from report_custom_filename.ir.actions.report.xml, but I think I am doing something wrong. Could we get some example please? Thanks in advance!


Nice work! Very useful module.
by
Luke
on 4/28/15, 4:34 AM

@hbrunn, Very nice work, I posted a forum post asking how to do this just recently: https://www.odoo.com/forum/help-1/question/8-0-how-can-i-create-a-custom-report-filename-for-odoo-eg-so039-2015-04-25-pdf-84454 I'll update the above forum post with some howto's later. Thanks again!


addendum
by
M F
on 11/1/16, 7:56 AM

Correction: ${ o.internal_number + o.partner_id | replace("res.partner","-") | replace("(","") | replace(")","") | replace(",","") }_Invoice.pdf