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

Hello, I have 2 Models, ModelA and ModelB. They have both a many2many relation on each other. This was to get the tag list working (it was either showing a random one default or not saving), however, it is really only a one2many.

I am looking to figure out how you can restrict ModelB from being connected to more than one ModelA via the domain named argument.


Thanks :)

아바타
취소

Domain on many2many field: http://bit.ly/2DarOfB

베스트 답변

Return a domain via onchange function for the related field. The return domain should be like [('id', 'not in', [ids])], here ids should be the current data included in related fields.

아바타
취소
관련 게시물 답글 화면 활동
0
11월 22
80
1
6월 22
7318
2
10월 21
5141
1
7월 21
2868
1
7월 21
4344