Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odgovori
4964 Prikazi

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
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
sep. 23
9734
1
feb. 22
6705
2
jul. 19
2773
0
nov. 18
2781
4
sep. 18
4763