How to Understand Odoo Table Relationships Without Opening the Database

January 6, 2026 by
How to Understand Odoo Table Relationships Without Opening the Database
Jasson
| No comments yet

Working with Odoo often requires understanding how different models relate to each other. While you could dive into the PostgreSQL database directly, there are much easier ways to explore these relationships right from within Odoo itself. Let's explore the practical methods that will save you time and keep you productive.


Why Avoid Direct Database Access?

Opening the database directly can be risky and overwhelming. You might accidentally modify data, struggle with cryptic table names, or miss the business logic that Odoo applies. Instead, Odoo provides built-in tools that give you a clear, safe view of your data structure.


Method 1: Use Developer Mode

Enable Developer Mode

Navigate to Settings → Activate Developer Mode. This unlocks powerful debugging features throughout your Odoo interface.

Once activated, you'll see a bug icon in the top right of any form view. Click it and select  " Fields" or "View Fields" to see all fields in the current model, including their types and relationships.  You can also Go to  Settings → Technical → Database Structure → Fields.



Method 2: Explore Technical Settings

Navigate to Models

Go to Settings → Technical → Database Structure → Models. Here you'll find every model in your Odoo instance with details about fields, relationships, and inheritance.

Click on any model to see its fields. Look for field types like Many2one, One2many, and Many2many to understand relationships between tables.


Method 3: Review the Source Code

Odoo's models are defined in Python files. Navigate to your Odoo installation and look in the addons folder. Each module contains a models directory where relationships are clearly defined in the code.

For example, you might see: partner_id = fields.Many2one('res.partner') which tells you this model has a many-to-one relationship with the partner model.


Understanding Common Relationships

Many2one: Links one record to a single record in another model (like an invoice linked to one customer).

One2many: The inverse of Many2one, showing all records that link back (like all invoices belonging to a customer).

Many2many: Multiple records can relate to multiple records in another model (like products linked to multiple categories).


Conclusion

Understanding Odoo's table relationships doesn't require database expertise. By using Developer Mode, exploring Technical Settings, reviewing source code, or consulting documentation, you can quickly grasp how your data connects. These methods keep you working within Odoo's safe environment while giving you the insights you need to build better customizations and integrations.


How to Understand Odoo Table Relationships Without Opening the Database
Jasson January 6, 2026
Share this post
Archive
Sign in to leave a comment