İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
5637 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eyl 23
10361
1
Şub 22
7564
2
Tem 19
3273
0
Kas 18
3212
4
Eyl 18
5276