Import data in odooImporting data into odoo is not as simple as it seams to be at a glance. Very much relational data in odoo tables are making the import complicate and time-killing. There are many default values to be set in odoo correctly whitch have to be included by the mapping.
Data migration has always been a key issue. Data export is a odoo standard feature. It is available in any list views. An export file from odoo data export makes sure, that the exported file can be imported back to odoo, if the Import Compatible Export was set. odoo export does not require very much technical expertise. But – export data has the same structure as the import data should have. That means, that source data must get this structure before import – and doing this whit excel or other databases can be a killer.
The common information one find in the web about methods to import data into odoo are mostly explaining the procedure to export first data from odoo, then structurise source data and configurate an import-file with the same structure as the export-file has.
Many articles and videos demonstrate the import of data into OpenERP odoo using the XML-RPC method whitch works through the ORM (Object Relationship Model). But - unfortunately going through XML-RPC is very slow. Each record insert can take more then a full second. By importing thousands of records (or perhaps millions of records) the XML-RPC method is simply too slow to be an adequate solution.
And - importing data is always a chance to revise source data. Without an import- or migration-tool, revise of data usually has to be done manually. This costs a lot of time and it is insecure.
Therefore we developped a plattform with a webbased service for migration and data import in odoo. www.odoo-import.com is the webbased service from giordano.ch for importing data into odoo.
Data import knows three different ranges. The first is the lowest range of flat data structure, easy and not so complicated. So it can be done by simply export data from odoo and import same structured flat data into odoo. The highest range is the one of migration from main releases of odoo. This is huge, complex and it is better done by odoo itself, especially, when the odoo application database contains warehouse, purchase, manufacturing, complex accountig, analytic accounting and further more and the whole data history within all relashionship has to be migrated up to a higher main release. By realising a migration, a very important topic is the analysis of data consistency. A migration can only be built successfully when data consistency can be analysed and proofed by a specific reporting tool.
That means, that odoo-import covers the medium range of data import complexity. It is possible to import relationship structured data and proof data consistency within a logfile reporting. Whenever relational datastructure is given, odoo-import ist the best solution, because with odoo import it is easy to configurate the right helper for the mapping.
In addition to the basic import functionality, odoo import provides also the advantage of using cronjobs. Recurring imports can be set based on a existing import configuration.
Main features and advantages
1. time saving – once you configured your import, testing is very efficient
2. analyse testimport with logfile – adjust mapping and helper
3. economy of changemanagement – import several and changed data from source with same configuration
4. recurring imports with cronjob
odoo-import is made for companies who use odoo and have the need for data import or migration, recurring data import or it is also made for odoo implementing partners, who help their customers to import or migrate data. odoo-import supports odoo version 8 an 9 (and further versions).
How does odoo-import operate?
odoo-import is structured into three main parts:
1. connections: the configuration of connections
2. import: the configuration of the database mapping and helper
3. cronjob: recurring imports
The configuration of connections is a setting to connect source file and odoo application database. Source-file has to be a .csv document which you can export from any other application database or from another odoo application. The target application has to be a odoo application database. These settings can be stored. No data has to be stored somewhere or uploaded to odoo-import. The source .csv file remains there where it originally is. It will not be copied, uploaded or stored somewhere else.
The main part is „import“ – here the functionality applies tool for mapping. Basic information like database and model has to be set. After that, configuration of the mapping and definig the helpers can be started. The mapping table provides two trees of database fields – on the left side the tree of the source .csv data file and on the right side the tree of the odoo database model. Fields which are missing in the source .csv file can easily be added to the tree.
Because the odoo model tree can be very large, odoo-import provides a search-field functionality. Once the required odoo target field is located, it can be mapped with the accurate database field of the source .csv file per drag and drop.
The medium columne contains the helper functionality. A helper has always a relationship between the source and the target field. Its functionality can be configurated and stored separatly under „helpers“. A helper can be configurated for instance „true/false“ or setting default values or „regex“ and many more. Once the configuration is done – if a helper is neccessary at all – you can use helpers many time in the mapping menue. The whole configuration of mapping can be saved for editing further on.
After clicking on „start import“, the .csv source file has to be selected – these for all reasons of security and to make sure, that the recent version oft the .csv file is connected for the import. Now, import data can be verified. odoo-import ist proofing the data in the .csv file and is checking out inconsistent data and lists the founded errors. Before the final import is done, well detected. So, configuration can be adjusted and a new verification can be startet.
When all adjustements have been proofed, the import can be startet and up to 10 records can be transfered to the destinated model in the odoo databse. Here one can check out immediately, whether everything was imported correct. If not, one do not have to start the whole import process from the beginning. It is adequate to correct the configuration and test it again. This is helpful and recomended to do bevor the final import with mass data is started – then mass data import can take some time. So one can save a lot of time.
Importing complex database structures
'many2one': By importing values into a 'many2one' field, the specific values must be already present in the relational model oft he odoo target database. The operation with the field type many2many is similar.
Based on a stored mapping configuration an a initial import of data, one can use the cronjob function for scheduling recurring imports. Not: also with cronjobs no data will be uploaded or stored to odoo-import.com.
Possible usages of odoo-import
1. import data from other systems, databases and applications into odoo
2. first import of data by implementing odoo the first time, like customers, suppliers, products containing all relational data
3. migration and datatransfer from older odoo versions into new or changed models of odoo
4. recurring or periodic import of – usually changed and mutated data such as price lists from suppliers, catalog data and so on
odoo-import is a trusted application
5. the source .csv data file is not stored at all ant it remains in the source folder of the foreign system
6. odoo-import reads data from the .csv file without storing them
7. during the import, odoo-import verifies the data bevore it writes them directly into the target model of the odoo database – so data consistent is assured
8. passwords do not have to be saved (but saving them can be used)