Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
4979 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
sept. 23
9745
1
févr. 22
6730
2
juil. 19
2780
0
nov. 18
2788
4
sept. 18
4771