コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
4701 ビュー

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

アバター
破棄
関連投稿 返信 ビュー 活動
2
9月 23
9433
1
2月 22
6367
2
7月 19
2620
0
11月 18
2642
4
9月 18
4598