콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
10 답글
20857 화면

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?

아바타
취소
베스트 답변

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.

아바타
취소
작성자

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

작성자

See my addition on the question.

This is static name for every report same.

베스트 답변

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"
        />
아바타
취소
베스트 답변

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.

아바타
취소
작성자

See my addition on the question.

you replied something else the question above.

베스트 답변

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? 

아바타
취소
베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
0
4월 24
1691
0
6월 21
3554
3
7월 24
3263
0
10월 24
1165
1
9월 24
1745