Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4360 มุมมอง

Hi friends, I am using binary field for attaching documents.After I attach a document, It comes as a link(download(size)).But I need a file name after I attached a document instead of link(download(size)).

อวตาร
ละทิ้ง

using Document Management System module can attach document with file name.

คำตอบที่ดีที่สุด

Hi

Try this code

Add in .py file

    'datas_fname': fields.char('File Name',size=256),
    'file': fields.binary('File'),

Add in .xml file

<field name="file" filename="datas_fname'"/>

<field name="datas_fname" invisible="1" class="oe_inline oe_right"/>

Thanks

อวตาร
ละทิ้ง