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

Hi All,

I have a binary field in a wizard, and I am trying to get the name of file attached in button action of that wizard.

I know it is possible in website.

Any Hints.?

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

Try this,

In Model,

file = fields.Binary("Attachment")

file_name = fields.Char("File Name")

In View,

<field name="file" filename="file_name"/>

<field name="file_name" invisible="1"/>

If you try this, binary field will show the file name.

Ảnh đại diện
Huỷ bỏ
Tác giả

Perfect, Accepting as answer.

Could you please tell me any way to get the path of the attached file.?

Tác giả

Yes, Got it

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 23
1627
4
thg 10 18
8403
3
thg 6 18
6959
1
thg 12 19
3558
0
thg 10 19
2868