İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3014 Görünümler

Add versions on the PDF name for RFQ/Sales Orders

Avatar
Vazgeç
Üretici En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
May 21
3426
5
Şub 24
9258
1
Haz 21
2371
1
Nis 21
8
1
Nis 21
8418