Add versions on the PDF name for RFQ/Sales Orders
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
May 21
|
2499 | ||
|
5
Feb 24
|
7341 | ||
|
1
Jun 21
|
1418 | ||
|
1
Apr 21
|
7 | ||
|
1
Apr 21
|
6120 |