Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
4 Vastaukset
8419 Näkymät

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
Hylkää

can you elaborate a bit more?

Tekijä

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.

Tekijä Paras vastaus

 

Avatar
Hylkää
Paras vastaus

\

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
Hylkää
Tekijä

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.

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
syysk. 19
98
1
heinäk. 17
4207
1
toukok. 16
5037
1
maalisk. 16
5040
2
maalisk. 16
7311