0

I can't change the default name for my pdf reports. It works if I do it in the settings but I don't want to do it this way. I tried by using report_name in my <report> but it says that report_name is not an element of report. I can't figure out how to do it.

Zada1100
  • 41
  • 1
  • 8

1 Answers1

0

For set-up custom name of qweb report you can set attachment attribute of report.

Example is available if for invoice:

    <report 
        id="account_invoices"
        model="account.invoice"
        string="Invoices"
        report_type="qweb-pdf"
        name="account.report_invoice"
        file="account.report_invoice"
        attachment_use="True"
        attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"
    />

Try to use module : https://www.odoo.com/apps/modules/8.0/report_custom_filename/

Hope this helps.