Skip to Content
Menú
This question has been flagged
3 Respostes
5222 Vistes

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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
2
de set. 23
9949
1
de febr. 22
6992
2
de jul. 19
3028
0
de nov. 18
2948
4
de set. 18
4942