How to set PDF name in qWeb report, Odoo?

后端 未结 8 1885
灰色年华
灰色年华 2021-01-12 13:41

I\'m making reports using qWeb in Odoo 8. Those generated PDF files are saved with a \"default\" name. I would like to set a specific name to every generated file (not after

8条回答
  •  难免孤独
    2021-01-12 14:19

    Easy Way to change report PDF file name in Odoo v10:

    Just add this code where you write the report tag, and give same ID in both, report and new added record. Like the following:

    
    
    
        'SALES_'+object.name+'.pdf'
    
    

    It will print the report file as SALES_SO004.pdf, where SO004 is your sale or quotation number.

提交回复
热议问题