Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4287 Widoki

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 :)

Awatar
Odrzuć

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

Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lis 22
80
1
cze 22
7904
2
paź 21
5582
1
lip 21
3347
1
lip 21
4864