Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


I want to know which are the tables of the database of OpenERP 7 ?

on 3/11/13, 9:03 AM 7,585 views

I need to know for each module of OpenERP 7 what are its tables assiciated in PostgreSQL.

Ok, Thank you Sir.

on 3/11/13, 9:15 AM

select table_name, table_type, table_catalog from information_schema.tables where table_schema = 'public'

on 3/11/13, 9:43 AM

Andreas Brueckl

--Andreas Brueckl--
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 3/11/13, 9:09 AM

PostgreSQL tables are not related to modules. They are related to OpenERP models, like sale.order or stock.move. Every module can have zero-to-many models.

The table names are generated by using the model names and replacing all . by _. For example the table name of sale.order is sale_order.

It is not possible to assign each database table to a specific module because many tables are used by different modules and there are about 600 tables.


Ray Carnes

--Ray Carnes--
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 3/11/13, 3:28 PM

We use http://schemaspy.sourceforge.net/ to help visualize the tables in the database, understand their dependencies and suggest which tables should be populated before others - accounting information before products and partners for example.

ORM manages the persistence of data inside PostgreSQL. As others are posting, which tables are used depends a lot on python code in many different places.

Another method we use to understand the tables involved is to set the server to log the SQL requests.


AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
| 4 5 8
Bronx, United States
--AJ Schrafel Paper Corp--

Exploring OpenERP for business

AJ Schrafel Paper Corp
On 3/11/13, 11:39 AM

You can see all the tables in postgres by connecting to your database and listing the tables.

sudo su - postgres
psql -d yourdatabase

now type this command to list all the tables in a DB


If you look in the python file for the associated module, it will list the models for that module. The models translate into tables in postgres. The model name will be changed from model.name to model_name

A module is not required to have tables, so there might be no tables for some modules.

how to get the database name?

sneha antony
on 3/27/14, 4:59 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 3/11/13, 9:03 AM
Seen: 7585 times
Last updated: 3/16/15, 8:10 AM