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

I'm trying to use HTML attributes with form fields. What I was trying is to use maxlength attribute with a text field. I tried the followings:


1. <field name="slug" maxlength="50" />
2. <field name="slug" attrs="{'maxlength': '50'}" />


But neither of these tactics are not working. Is it possible to use native HTML attributes like maxlength, size etc with Odoo form fields?

Any help would be appreciable!!

아바타
취소
베스트 답변

Fields of type text have a size parameters that can be used in definiton


slug = fields.Char(size=50)
아바타
취소
관련 게시물 답글 화면 활동
2
5월 21
18860
1
5월 23
2357
Time field in odoo 해결 완료
3
3월 20
42853
0
3월 15
4206
1
2월 23
7944