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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
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.
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
1
Jul 25
|
363 | ||
Search a message
Diselesaikan
|
|
1
Feb 25
|
1166 | |
|
0
Des 24
|
1323 | ||
Import Data From Another Model
Diselesaikan
|
|
1
Mar 24
|
2367 | |
|
0
Sep 23
|
2129 |