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?
To pytanie dostało ostrzeżenie
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.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
Reuse field from a different Model
Rozwiązane
|
|
1
mar 26
|
1800 | |
|
|
1
lip 25
|
3203 | ||
|
Search a message
Rozwiązane
|
|
1
lut 25
|
3168 | |
|
|
0
gru 24
|
3405 | ||
|
Import Data From Another Model
Rozwiązane
|
|
1
mar 24
|
4763 |