Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2141 Lượt xem

I am rookie of odoo and I am confused with some fields like the 'field' in the mail,

I cannot understand the usage of many2one field filling comodel_name with 'ir.model.fields'.

Please help me out and thank you.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Helllo, Enish


I hope you're doing well.


In Odoo, a `Many2one` field creates a relationship between two models. When you set `comodel_name` to `ir.model.fields`, you’re linking to a model that represents fields within other models in Odoo.


The `ir.model.fields` model stores information about all fields across Odoo, including their names, types, and associated models. This is particularly useful for configurations where you need to reference specific fields dynamically across different models.


You can refer the attached images.


The "Customer" field is a `Many2one` field with `comodel_name` set to `res.partner`, which means it displays all customer records from the "res.partner" model in the dropdown.






I Hope this information proves helpful to you. 

Thanks & Regards, 
Email: odoo@aktivsoftware.com 
Skype: kalpeshmaheshwari

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks for your helping.
:)

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 1 22
3455
2
thg 6 19
2878
0
thg 12 15
5345
0
thg 3 15
4604
1
thg 8 23
2938