콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
5183 화면

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
9931
1
2월 22
6977
2
7월 19
3006
0
11월 18
2924
4
9월 18
4920