This question has been flagged
2 Replies
4294 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

Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer

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):
Avatar
Discard
Author

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.

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.