Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
5199 Zobrazení

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šit
Nejlepší odpověď

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šit
Related Posts Odpovědi Zobrazení Aktivita
2
zář 23
9941
1
úno 22
6983
2
čvc 19
3013
0
lis 18
2935
4
zář 18
4926