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

hi i have a tab named qualification on a form,,,in which i have 3 fields i do not want them to be empty means if they are empty they should not be saved,,,i have added the attribute "required = True",,,,but its not working,kindly can someone tell?

아바타
취소
작성자

paresh wagh sir its not working,,

베스트 답변

Hi,

Remove attrs

<field name="degree_title" placeholder="Degree Title" required='1'/>
Thanks

Aswini - iWesabe


아바타
취소
베스트 답변

Can you please share the code, how you declared it in python and xml?

아바타
취소
베스트 답변

Please share your code here for both file python and xml without your code we can't help you.

아바타
취소
작성자 베스트 답변


<page name="Parent’s Qualification" string="Qualification">
<field name="qual_ids">
<tree string="Qualification" name="Parent’s Qualification"
editable="top">
<field name="degree_title" placeholder="Degree Title" attrs="{'required': [(True)]}"/>
<field name="insit_name" placeholder="Institute Name" attrs="{'required': [(True)]}"/>
<field name="qual_year" placeholder="Qualification Year" attrs="{'required': [(True)]}"/>

degree_title = fields.Char(string="Degree Title", required=True)insit_name = fields.Char(string="Institute Name", required=True)qual_year = fields.Char(string="Qualification Year", required=True)​







아바타
취소
작성자

this is the code in xml and python file

베스트 답변

Remove the brackets around True and change 

attrs="{'required': [(True)]}"

to

attrs="{'required': True}"

아바타
취소