Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3015 Visualizzazioni

Add versions on the PDF name for RFQ/Sales Orders

Avatar
Abbandona
Autore Risposta migliore

In order to change the PDF name of a PDF file, you have to have studio.

First, you have to add a text field on the Sale Order with studio. In this field, you will add manually the number of the version . Let´s say this new field has the technical name: x_studio_version.

Once on a sale order, go to studio > Reports Menu > Quotation/Order report. On the left hand side, you will have Studio Menu, go to Report tab and copy this code on the field Printed Report Name: 


(object.state in ('draft', 'sent') and 'Quotation - %s - %s' % (object.name, object.x_studio_version)) or 'Order - %s - %s' % (object.name, object.x_studio_version)

In the code, you will have to change the technical name to the name of the field you added on your SO. Once you print the PDF, the name will come up with the number you will have manually added on your Version field created.

If you want to also change the name of the PDF when sending email confirmation on the SO, you have to be on debug mode and be Admin. Go to Settings > Technical menu > Templates and find the one named "Sale Order: Confirmation Email" go to tab Advanced Settings and on the Report File name add this code:

${(object.state in ('draft', 'sent') and 'Q - %s %s' % (object.name, (object.x_studio_version) or '')) or 'O - %s %s' % (object.name, (object.x_studio_version) or '')}

Again, you will have to replace the x_studio_version name with the name of the field created for Version in your SO.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mag 21
3426
5
feb 24
9258
1
giu 21
2371
1
apr 21
8
1
apr 21
8418