This question has been flagged
1 Reply
3468 Views

Hello,

I struggle with the name of the PDF document when hitting the print button (of an invoice). Using V7.0 in technical => action => report you probably can define how the system should rename the document.

For invoice there is a predefinition with a new installation as follows:

(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')

This does not work as I could also read in some discussions here.
In the email template the definition of the appendix works great as it should, but with the following definition:

 INV_${(object.number or '').replace('/','_')}${object.state == 'draft' and '_draft' or ''}

a) Is there any new hint how to do it for the print-version?
b) why is it different between email template and print-version?

Avatar
Discard

Very interesting! I am working on this. If I find something, I will say to you.

You should look in Settings->technical->database structure->Attachments when you do your tests. You will discover many interesting things about created reports files.

Best Answer

Here is our solution for odoo v8 to customize the sale order report PDF name with the « print » buttons.

https://www.odoo.com/forum/help-1/question/change-printed-file-name-in-webkit-report-in-odoo-59901

Avatar
Discard