Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
8337 Widoki

as mentioned earlier, i am from Oracle environment, just want to clear the confusion, please guide and confirm this:

what I understand that these are like Primary Key and Foreign Key relationship? 

One2Many is Primary Key of a Model (Table) and Many2One is Foreign Key in another Model to create this relationship, for example:

Department ID of table Departments is One2Many (Primary Key) 

Department ID of table Employees is Many2One (Foreign Key)


please correct me if I am wrong.

regards

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

You can refer to the following links.

Link: Relation Between Odoo Models: Create One2Many Field | Datatype In Odoo | Odoo Fields Tutorial 

Link: How to Add One2many Fields In Odoo

Link: Yenthe's answer


Awatar
Odrzuć
Autor

thanks, as per my understanding, on link of youtube video the guy mentioned it ID of School Model is Primary Key (One2Many) and SchoolID of Student is Foreign Key (Many2One), this is what I can understand easily as per my background :)

Najlepsza odpowiedź
Hi SmithJohn45,

 

Please refer the answer given by Yenthe! 


https://www.odoo.com/forum/help-1/can-anybody-tell-difference-between-many2one-and-one2many-with-example-144734

Awatar
Odrzuć
Autor

thanks for your interest to help us :)

Powiązane posty Odpowiedzi Widoki Czynność
1
gru 20
3660
1
paź 23
3005
2
kwi 23
2897
1
mar 23
2428
2
lut 25
40727