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

hi i need file name on upload any file

'file_name': fields.char('File name', size=200), 'file_upload': fields.binary('Documents'),

Thanks.

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

Hi Mohammed,

You just have to link your char field with your binary field to show file name. Just add an attribute filename="your_char_field_name" in binary field.

Like this:

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

Hope this will solve your problem.

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

Thanks Sudhir. It really helped me a lot and worked. +1 for this.

Thanks @ Sudhir Arya, this code is very helpfull +1 vote for this

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

Hi,

This will help you

https://accounts.openerp.com/forum/Help-1/question/16686

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