Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
5221 Переглядів

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.


Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
вер. 23
9946
1
лют. 22
6991
2
лип. 19
3027
0
лист. 18
2948
4
вер. 18
4942