Skip to Content
Menu
This question has been flagged
3 Replies
5312 Views

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.


Avatar
Discard
Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
2
Sep 23
10003
1
Feb 22
7108
2
Jul 19
3072
0
Nov 18
3007
4
Sep 18
5020