Skip to Content
Menu
This question has been flagged
3 Replies
5185 Rodiniai

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.


Portretas
Atmesti
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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
rugs. 23
9931
1
vas. 22
6978
2
liep. 19
3006
0
lapkr. 18
2925
4
rugs. 18
4922