Skip to Content
Menu
This question has been flagged
3 Replies
5633 Zobrazenia

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
Zrušiť
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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
sep 23
10356
1
feb 22
7555
2
júl 19
3272
0
nov 18
3209
4
sep 18
5270