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:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
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
7月 25
|
454 | ||
Search a message
已解決
|
|
1
2月 25
|
1229 | |
|
0
12月 24
|
1405 | ||
|
1
3月 24
|
2445 | ||
|
0
9月 23
|
2172 |