Odoo Help


How to Export and Import data in OpenERP 7

on 6/24/14, 10:58 AM 4,332 views

Dear all,

It makes now almost a week that I am trying to export data from one OE7 database to import it in another one. Here's my problem (I do not want to restore a Postgresql database):

  • I am using OpenERP Version 7.0-20140620-231150
  • I created a database, lets call it DB1, with the following Apps installed
    • Project Management (which also installs the Social Network app)
    • Accounting and Finance
    • Sales Management
    • Employee Directory
    • Timesheets
    • Address Book
  • However, the people for whom I am installing the database don't need all this, they only need
    • Project Management (which automatically installs the Social Network app)
    • Employee Directory
    • Address Book
  • So I created a new database, lets call it DB2, with only the 3 needed apps mentioned above
  • And I thought about exporting from DB1, say the Users, and importing them in DB2
  • However there always seems to be a bug at import, on the lines of: "No matching record found for external id '__export__.mail_alias_139' in field 'Alias' between rows 3 and 4"
  • So I first tried to tackle each of the "issues" OE7 seems to find at import
    • I spent almost an entire day doing it, diligently, until I realised that only a few columns remained but OE7 was still not happy.
  • I thought that as there were more Apps in DB1, DB2 could not import the data generated in DB1 and that I was stuck with all those unwanted Apps.
  • So I thought about doing the export process the other way around (DB2 to DB2):
    • by creating only one user in DB2 (apart from the administrator),
    • exporting the data in CSV,
    • erasing the user and
    • reimport it in DB2,
    • but oddly enough, OE7 is creating the same kind of messages as in the original DB1 to DB2 imports...

Could anyone tell me what is going on? If the DB1 to DB2 transaction does not work, it is imaginable because the installed Apps are not the same. But come on, from DB2 to DB2, that should work...

What are the fields needed if I want to have say the following items (for the moment only Settings -> Users):

  • Preferences tab
    • Picture
    • Name
    • Login
    • Company
    • Active
    • Language
    • Timezone
    • Signature
  • ​Access Rights tab
    • Sales
    • Project
    • Human Resources
    • Sharing
    • Administration
    • Contact Creation

I would like to do the same with the Projects and the Human Resources Apps (the show the same kind of issues as the Users Export-Import in Settings).

Thanks in advance for any advice/help,



I cannot remember it's name off-hand, but there is a special data table dedicated to correlating external IDs to internal IDs. If you have not addressed the problems of having that match up correctly you will fail at this. My understanding however, is that attempting to bypass the ORM layer and go directly to the database will involve you in an endless tangle of problems. The "safe" route in is via XMLRPC.

on 6/24/14, 1:20 PM

Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

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. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 6/25/14, 3:30 PM

When you activate Developer Mode, you can hover over each field on any screen to see what the database field name is (the one that you need to select when exporting).

You should continue to work on the learning curve of importing via CSV.  It works fine once you understand the way it works, but it does take work.

Database imports I would never do.  XML-RPC is a fine alternative approach.


Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
Serpent Consulting Services Pvt. Ltd.
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 6/24/14, 12:15 PM


If I would be you, I would take different approaches.

1. Create a python script which will read from DB1 and send records to DB2. This should be done per model.

2. Pgadmin gives you a facility to export the SQL, this should be perfect match.

The above options are done on the background, so DB2 has the values as exactly the DB1 had.

3. View-wise bugs should be fixed as and when you face them. You should have a list of fields that are changed/removed/added on any model in v7.

Hope this helps.

We may even discuss your problems one by one.


About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 6/24/14, 10:58 AM
Seen: 4332 times
Last updated: 3/16/15, 8:10 AM