Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
10 Antwoorden
20621 Weergaven

When I make a quotation in v6.1 with sales/sales Order and print this quotation I get a pdf with the name sales.order(xxx).pdf with xxx a sequencenumber.

I want to change the name in Qyyyyy.pdf with yyyyy=Orderreference number. This sequencenumber is SOzzz with zzz is the standard sequencenumber.

I have been looking to:

  1. settings/customization/low level objects/actions/reports and
  2. settings/configuration/Sequences & Identifiers/Sequences.

But I couldn't solve it.

How to do this?

Additional 7-5-2013 16:30 because of the answers (thank you all for them!): Yes the name document that is saved as an attachment can be manipulated.

But what I specific mean is the name of the pdf file that is direct generated from the browser like a download pdf. This is always sales.order(xxx).pdf with xxx a sequence number. This name differs from the attachement that is saved ...... ?

How to manipulate this name is the same as the attachement?

Avatar
Annuleer
Beste antwoord

By default pdf name is updated by the string we define in <report></report> tag. Take an example suppose the report tag is like this

<report auto="False" 
        id="report_sale_order" 
        model="sale.order" name="sale.order"
        rml="sale/report/sale_order.rml" 
        string="Quotation"
        usage="default"/>

then generated pdf file will be named as Quotation.pdf & if we change the string of the report

<report auto="False" 
    id="report_sale_order" 
    model="sale.order" name="sale.order"
    rml="sale/report/sale_order.rml" 
    string="My Sale Quatation"
    usage="default"/>

Then the pdf file will be saved as My Sale Quatation.pdf

From client also you can set pdf name for that you have to change the name of report in settings/customization/low level objects/actions/reports. Change the name of the report and go to menu & open sale order there you can find changed name report.

Avatar
Annuleer
Auteur

Where to find this <report></report> tag in the menu?

Auteur

See my addition on the question.

This is static name for every report same.

Beste antwoord

You can use it like it in the invoice. The attachment attribute can be used to change the name of the file.

<report
        auto="False"
        id="account_invoices"
        model="account.invoice"
        name="account.invoice"
        rml="account/report/account_print_invoice.rml"
        string="Invoices"
        attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"
        attachment_use="True"
        usage="default"
        />
Avatar
Annuleer
Beste antwoord

Here this works for me.

In settings/customization/low level objects/actions/reports, I searched Quotation / Order report, and edit it with following

In Attachments,

1) In attachment field ('Save As Attachment Prefix') put following code in textbox

('SO'+(object.name or '').replace('/',''))

  • here 'SO' is string whatever you want to print

2) attachment_use field ('Reload from Attachment') check mark True.

you will see that attachment named like 'SO0001' under the Attachments icon, click there to see the attachments. if you want to save this file to your computer just click the button “Save as” and then a window will appear, giving you the chance to keep or change the name of the .pdf file.

Avatar
Annuleer
Auteur

See my addition on the question.

you replied something else the question above.

Beste antwoord

I have the same problem with Odoo 8 now. I want the number of the sales order as PDF file name. Is there any solution? 

Avatar
Annuleer
Beste antwoord

Hi,

For v8, there is a solution, might be useful for somebody. Try this module:

https://www.odoo.com/apps/modules/8.0/report_custom_filename/

For sale order, goto Settings >> Technical >> Actions >> Reports and open the sale order report.

under Download filename, you can give ${o.name}.pdf

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
apr. 24
1426
0
jun. 21
3405
3
jul. 24
2914
0
okt. 24
1019
1
sep. 24
1532