Odoo Help


Most efficient way to format csv for importing?

Sean Samborski
on 12/26/13, 11:45 PM 2,008 views

I have sales orders, purchase orders, delivery orders, etc all coming from another ERP system I'm wanting to move over in OpenERP v7. Since I need to translate the data from the old ERP system for use with OpenERP, you can imagine how large a task this is. There's over a million lines total with thousands of products, customers, line items in the orders, etc. I need to hear the suggestions people have for formatting these lines. For example, each customer I need to take the name as exported from the old ERP system, and match it the __export__.res_partner_id from OpenERP. What would be the fastest way to do this?

That's even the least of my concerns, getting the products (which is around 20K) mapped over into their respective IDs as well. So what are people using to solve this problem? Normally I would do this kind of work on the database level, but with as many relationships as SOs, POs, and what not create, I'm sure I would corrupt the data in some way if I don't do it the way suggested by OpenERP.


Fabrice Henrion (fhe)

--Fabrice Henrion (fhe)--
| 7 7 9
San Francisco, United States
--Fabrice Henrion (fhe)--

Director Odoo Americas

Fabrice Henrion (fhe)
On 12/27/13, 2:55 AM

If you intend to import csv files through the UI, the best is to export sample data first to see what is the format of an exported csv file and reuse this format to import your data. Obviously, if you need to import objects that are associated with each other, you will need to understand the different concepts of database ids, xml ids, external ids,...

However, if you have tens of thousands of records (or more), importing through the UI is not going to work. The risk for the system to hang will be too high. In that case, you should code a script to import the data from your source (a db or a readable file) through the ORM. There are a couple existing tools that will allow you to do this without having to start from scratch. To name a few: Kettle modules and OpenERP client libraries like openerp-client-lib, OERPLib, oersted. Still it will require extensive work. In any IT project data import is always very complicated because it's always a different situation depending on the original DB structure, the sources, the objects to import,...

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

1 follower(s)


Asked: 12/26/13, 11:45 PM
Seen: 2008 times
Last updated: 3/16/15, 8:10 AM