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?
لقد تم الإبلاغ عن هذا السؤال
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.
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل| المنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
|---|---|---|---|---|
|
|
1
مارس 26
|
1687 | ||
|
|
1
يوليو 25
|
3001 | ||
|
Search a message
تم الحل
|
|
1
فبراير 25
|
2998 | |
|
|
0
ديسمبر 24
|
3299 | ||
|
Import Data From Another Model
تم الحل
|
|
1
مارس 24
|
4698 |