Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
5191 Vistas

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
Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
2
sept 23
9937
1
feb 22
6982
2
jul 19
3011
0
nov 18
2929
4
sept 18
4926