İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3255 Görünümler

I have tree models (Model1, Model2, Model3), how can I show one field from Model2 or Model3 in Model1 with a TypeModel in Model1 and only an ID in Model2 or Model3?

Avatar
Vazgeç
En İyi Yanıt

You have to connect the two models with one field  over a many2one relation. Then you can automatically use any field of the connected model. As an example, check event.registration that contains the field event_id in a many2one relation with the precision that the model for event_id is event.event. This way, you can from within the event.registration access all fields of the corresponding event.

For more detail please check 

https://www.odoo.com/documentation/15.0/developer/howtos/rdtraining/08_relations.html

Hope this helps.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 25
368
Search a message Çözüldü
1
Şub 25
1198
0
Ara 24
1325
1
Mar 24
2379
0
Eyl 23
2140