Odoo Help

2

Where to document import structures as a community?

By
Gary Miller
on 4/25/13, 5:12 PM 1,932 views

Is there a place that the community can document V7 data import requirements? I believe that Most companies converting to OpenERP have years of history that needs to be imported, yet everyone is encouraged to use the slow built-in import process.

As a community, could we not share the specifics of the object requirements for fully importing a company's history? 95+% would be the same for everyone. It could be laid out as Required/Optional.

I am very new to OpenERP, but I would be willing to contribute to the process.
- Gary

0
Martin
On 4/25/13, 8:48 PM

Hi Gary,

I'm working on something that you may like to review as a possible foundation for your proposal.

http://martinhbramwell.github.io/GData_OpenERP_Data_Pump/

The first basic idea is to have a growing library of Python plugins, such as ResUsers.py that understand :

  1. How to read data from a dedicated sheet in a Google Spreadsheet workbook (such as OpenErpGDataModel) )
  2. How to interact with the corresponding ORM model's API methods.

So far these "plugins" are dedicated to direct data loading, but that's just a consequence of the stage of development. Methods can be added to make them do anything that one can do, on a model, via XML-RPC.

The second basic idea is to have a dispatcher within a dispatcher, which get their instructions from a control sheet, such as this one : OpenErpGDataController, and loop through each method of each model.

Please let me know your opinion, and feel free to interrogate if you want further details.

2013/04/26

If you read two bits of code you'll understand just how trivial the project is:

In gDataTools.py the loop :

for row, task in enumerate(namesTasks):

In OErpModel.py the loop :

for idx, parm in enumerate(self.task_parms):

Martin, I am still trying to wrap my head around what you have laid out, but I like it. Several years ago I created a tool for syncing data from Cobol into MySQL. I did it in two parts: 1) A Program that could read Cobol records & insert into SQL tables; and 2) A XML translation table (my Roseta Stone) that linked the Cobol data table to a SQL data table, as a paring of from & to field names. Then the only requirement was to call the Program with a table name parameter. Adding a new table only required adding the table fields to the XML translation list.

GroupMiller, Gary Miller
on 4/26/13, 2:05 PM

That's very similar, yes, I think so. Probably the best way to understand what I've done is realize that it's a trivial piece of work. I did the bulk of it in a weekend (ain't Python great!). See my update.

Martin
on 4/26/13, 4:03 PM
0
Gustavo
On 4/25/13, 5:20 PM

It's a good idea... I think that rather than sharing our experiences in the import process, we could share our modules for that. If the modules happen to be coded in Python, they are easy to understand and more effective than reading a blog.

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.

Register

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)

Stats

Asked: 4/25/13, 5:12 PM
Seen: 1932 times
Last updated: 11/29/16, 12:06 PM