Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Change pdf name of Qweb report

on 7/6/15, 8:01 AM 977 views

How to change the pdf file name generated by qweb report?

Gustavo Hinojosa
On 5/11/16, 3:13 PM

Hi, hope you help.


def print_qr_report_medio_oficio(self):

report_obj = self.env['report'] # Instanciando el modelo

report = report_obj._get_report_from_name('ew_qr_sale.ew_reporte_factura_qr_hoja_medio_oficio') # Obteniendo el modelo

nombre_factura = 'name_report - nr'

report.name = nombre_factura # Cambiando el nombre a la factura

return {

'type': 'ir.actions.report.xml',

'report_name': 'ew_qr_sale.ew_reporte_factura_qr_hoja_medio_oficio',

'report_type': u'qweb-pdf',




| 6 4 7
Tbilisi, Georgia
On 7/6/15, 8:28 AM

Go to page "Settings/Technical/Actions/Reports"

here you can open corresponding record you want to change file name for and edit a "Save as Attachment Prefix" field (when you hover this fields name with mouse pointer, it'll display a tooltip help message). by changing this field, you'll change filename of the attachment saved. you can use python expressions here, as for example in Invoices pdf.

hope it'll help.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 7/6/15, 8:01 AM
Seen: 977 times
Last updated: 5/11/16, 3:13 PM