Importing different csv file templates to a single Model(Object) in OpenERP
This in an interesting module in OpenERP which I found useful recently for importing different csv file templates to a single object(model) in OpenERP. For example when we create a crone job (scheduler) to import csv files from different suppliers with their invoices which has different structure to the Customer Invoices in OpenERP. Below is a generic explanation of the existing module.
We have achieved till importing the csv files with different templates. We may have different type of templates (csv files) containing data, that should be imported(or updated) in same object in the database. We can create multiple template for the same object with different sequence and field name.
In openerp, go to Settings > Import Tool
There you can find two sub menus, Template and Import Chain
Template Menu
Here we have to define all the different fields that will be used for importing.
The template line contains the fields in the target model, that should be updated from the file. The column number in the csv is used as the sequence number in the template line(This is important).
Import Chain Menu
Here we specifies the csv file to be imported and also provide the needed list of templates (the records that we have created from the import tool menu)to be used for importing the csv file we have imported and its order in the chain link. After clicking the button Import Data, ifit works correctly the import result will be shown in the Import Result.
The module for 6.0.3 is attached here as well. Good luck
Attachment | Size |
---|---|
ea_import_for_6_0.zip | 15.8 KB |