Odoo Help

Welcome!

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.

2

Where to document import structures as a community?

By
Gary Miller
on 4/25/13, 5:12 PM 1,520 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

--Martin--
1978
| 5 6 8
Cornwall, Canada
--Martin--

Analysing, designing, coding and mentoring since 1975. Kilobytes to terabytes. Punch cards to punchy sites. My OpenERP video series: http://www.youtube.com/playlist?list=PLq7op4J183lX44ZlXPiHxUpRvmmRDtxye My Google Speadsheets --> OpenERP Data Pump project: http://martinhbramwell.github.io/GData_OpenERP_Data_Pump My email (with spaces removed) : mhb . warehouseman @ gmail . com

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

--Gustavo--
950
| 2 1 4
Buenos Aires, Argentina
--Gustavo--

Python developer, big fan of sailing

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.

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)

Stats

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