EP-19: What are Relational Fields in Odoo 18 | Odoo 18 Relational Fields Tutorials | Odoo 18 Videos
In Odoo, relational fields are fields that create a relationship between models (i.e., between different database tables). They’re used to link records from one model to another. This is one of the most powerful features in Odoo’s ORM (Object-Relational Mapping), making it easy to define and manage relationships between different business objects.
There are three main types of relational fields in Odoo:
Many2One (many2one)
Each record in the current model is linked to one record in another model.
On the Sales Order model, the Customer field is a Many2One field pointing at the Contact model. This allows many sales orders to be linked to one contact (customer).
One2Many (one2many)
A record in the current model can be linked to many records in another model.
It’s the inverse of Many2one.
Requires a Many2one field on the related model to work.
You could add a One2Many field on the Contact model to look at one customer’s many sales orders.
Lines: The Lines field is used to create a table with rows and columns (e.g., the lines of products on a sales order).
Many2Many (many2many)
The Many2Many field is used to link multiple records from another model to multiple records on the current model.
Example: A product can have multiple tags, and a tag can be used on multiple products.
#Odoo18 #RelationalFields #OdooTutorial #OdooDevelopment #OdooTechnical #NewFeatures #ERP #OpenSource #Odoo18 #Odoo18Tutorial #Odoo18Development #Odoo18ERP #Odoo18TechnicalTutorial #Odoo18RelationalFields #OdooMany2one #OdooOne2many #OdooMany2many #Odoo18Features #Odoo18Release #OdooPython
Connect With Us:
—————————————
➡ ️ Websitehttps://www.cybrosys.com/m/
➡ ️ Email: info@cybrosys.com
➡ ️ Twihttps://twitter.com/cybrosysosys
➡ ️ Lihttps://www.linkedin.com/company/cybrosys/brosys
➡ ️ https://www.facebook.com/cybrosystechnologiesnologies
➡ ️ https://www.instagram.com/cybrosystech/brosystech
➡ https://pinterest.com/cybrosys/ / cybrosys