Hello Guys,
I've designed reports for my custom modules using openoffice and RML. But while printing/generating the PDF file of the report, it's opening or saving as the report name.pdf, as listed in settings>actions>reports.
My objective is to add some id or number to the file name of the corresponding report, Ex: "My Report - 123.pdf", "My Report - 234.pdf" etc.
To achieve the above, i've tried 2 approaches as mentioned below :
Edit report from front end and add python code to Add attachment box and select the Reload from Attachment checkbox.
Added attributes like attachment, use_attachment, multi etc. under report tag in the module_view.xml file.
But no luck. Still the report PDF is opening/saving with the old name. Pls help me with this.
Any help would be appreciated. :)
Cheers
ASP :)
What did you enter in the "Save as Attachment Prefix" field while editing the report?
('MyReport '+(object.inv_num and (object.type)).replace('/','')+'.pdf')
where inv_num & type are the fields present in that module.