跳至内容
菜单
此问题已终结
3 回复
5184 查看

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

形象
丢弃
相关帖文 回复 查看 活动
2
9月 23
9931
1
2月 22
6978
2
7月 19
3006
0
11月 18
2925
4
9月 18
4922