Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4 Antwoorden
8527 Weergaven

You can use One2many to get a reference to all the records that reference the record with a Many2one field. Is there a similar inverse field for the Reference field type?

Avatar
Annuleer

can you elaborate a bit more?

Auteur

I have a model with a fields.Reference that can refer to rows from 6 models. I want an inverse reference from some of those 6 models back to the original one.

Auteur Beste antwoord

 

Avatar
Annuleer
Beste antwoord

\

dear Tamás Dombos
yes you can do it.
 as example you have:
- model1 and model 2.
field_model2= many2one with model1
field_model1= one2many with model2 by field_model2
I hope I helped you.
Avatar
Annuleer
Auteur

The question concerned the fields.Reference that allows you to refer to rows of several models, not Many2one that only allows you to refer to rows of one model.

Gerelateerde posts Antwoorden Weergaven Activiteit
0
sep. 19
98
1
jul. 17
4346
1
mei 16
5164
1
mrt. 16
5200
2
mrt. 16
7439