Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3590 Visualizzazioni

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
Abbandona

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

Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
nov 22
80
1
giu 22
7295
2
ott 21
5112
1
lug 21
2857
1
lug 21
4328