Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5 Trả lời
6955 Lượt xem

Hello guys.. I have tried using 'attachment' field to give name for pdf file with Qweb XML. but it do not work. I have seen an example from account invoice : attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')". When I generate the invoice to pdf, it is still using 'account.report_invoice.pdf' for pdf file name, where it came from 'name' or 'report_name' of report object field.

Thank u guys for your best help..

Ảnh đại diện
Huỷ bỏ

Idem for me! Did you solve this problem?

Tác giả

@Pascal Temblay: Yeah I have solve this problem with create my own report module. If you look at report/controller/main.py, u will find that name of file always reportname.pdf (report.report_name).

Câu trả lời hay nhất

Well, i have a similar issue. Installed the attachments app and i have seen there are two reports generated. One with the prefix set by me and one with initial setup.


The bothering thing is that i get the one with  basic filename (Quotation Order.pdf)

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Odoo is stupid in this area. Attachment and his name is not the same as the name of the invoice by clicking on "Print".

If you install module "Document Management System" you get an extra button "Attachment(s)", on invoice view, where, on list, you see  right and expected attachment name. An attachment is also a pdf file.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

@zbik: I don't think so bro.. Odoo allows the developers to customize what have built. It just lack on technical documentation. I have solve this problem with create my report route and controller.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
5
thg 6 17
9080
0
thg 8 16
5159
2
thg 6 16
3916
1
thg 6 25
3345
2
thg 12 24
4324