Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3599 Weergaven

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

Avatar
Annuleer

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

Beste antwoord

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.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
nov. 22
80
1
jun. 22
7299
2
okt. 21
5115
1
jul. 21
2860
1
jul. 21
4332