This question has been flagged
1 Reply
20483 Views

Where can I get a database schema for Odoo? 

I'd like to visually represent the tables so that I can understand the relationships.


Avatar
Discard
Best Answer

It is possible but only really works for understanding very small pieces of Odoo at a time.

For example, let's look at the TAG field on a Lead:

This can be represented visually like this:


You can see that CRM Tags can be used on Sales Orders as well as Leads.

However, even a very small Odoo database contains HUNDREDS of tables.  There are also INTERNAL tables for storing the User Interface, the Access Controls (Security), the Reports, etc.

It can quickly become very complicated to work with a visual representation.

It might work better to leverage the DATABASE STRUCTURE menu in Odoo (available in Developer Mode)


A 'model' is closest to a table in PostgreSQL, but some fields/columns can be defined by Python and might not even be persisted in PostgreSQL.

For more information, see

https://www.odoo.com/documentation/14.0/developer/reference/addons/orm.html


Note: the visual representation was created automatically by the free version of

https://www.dbvis.com/


Just to give you an idea, this is the visual representation of the Sales Order table and TWENTY-TWO relationships:


And for res.partner (Contact) there are 68 related tables:

Avatar
Discard

You know, this is a very impressive response and you even add links to tools that may be helpful in future.
Thank you.

Ssh! - don't tell anyone else though, my inbox will be inundated with questions!