İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
5271 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
9976
1
Şub 22
7064
2
Tem 19
3063
0
Kas 18
2996
4
Eyl 18
4998