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

hi

i have two fields like

class_name = fields.Many2one('class.name')

students = fields.Many2one('all.class.student', string ="Students" , related='class_name.name')

here if i select class name like 12th class then automatically only 12th class students should display but i give filter in code but thats not working,my code displaying whole classes's students name

아바타
취소

why you have create it , related='class_name.name' name is the character fields

베스트 답변

Hi,

students = fields.Many2one('all.class.student', string ="Students" , related='class_name.YOUR MANY2ONE FIELD')

아바타
취소