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

att_file = fields.Binary(string='Attach File')

name="att_file" widget="binary" options="{'accept': '.pdf, image/*'}" filename="name" string="Attachment"/>

This is my Html code is any one can help me to specify the file input type.


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Along with the field definition you can specify as follows:

options="{'accepted_file_extensions': '.pdf'}"


Sample: 

field name="worksheet_document" string="Document" options="{'accepted_file_extensions': '.pdf'}"


Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 23
9937
1
ก.พ. 22
6982
Error group_sale_order_template (v12) แก้ไขแล้ว
2
ก.ค. 19
3011
0
พ.ย. 18
2929
Custom float field auto rounding? แก้ไขแล้ว
4
ก.ย. 18
4926