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.

0

Import override

By
Mandeep
on 10/25/14, 3:01 AM 889 views

Is it possibe to override the import process for massaging some data. e.g. I want to import a CSV which has one of the columns (taxonomy/tags) as comma seperated names for products rather than ids. Can i somehow override the import process, read these and make corresponding entries. 

0
Mandeep
On 10/29/14, 12:49 AM

Thanks for the response. I was able to achieve this by creating a new model (inheriting the earlier model) that received the data in a format that i wanted (comma separated taxonomy names). I then overrid the create method of new model to not make any write calls but instead make a create call for the base model. This is after processing the data i.e. changing the comma seperated taxonomy names into taxonomy ids in the server. I then import data into the new importer model

0
E.R. Spada II
On 10/26/14, 1:48 AM

Yes, you can create you own external_id so you can relink back to origninal data files. But if you want to import to mupliple tables/relations, the fields you import to are very specific in odoo. You should create test example and then export to see the exact field names from odoo. In the case of importing sales orders, it can get more complex, but will work. I have exported table using datebase_ids, not external, creating the tables, doing the relations and building a proper csv file that can match data from tables in odoo. This way you will be able to make sure your data is mapped correctly. I know many use .py script. If you know it well, then go for it. But I use my trusted datawasher built in Filemaker, yes you can laugh now, but I import 40,000 lines at a time that uses 12 tables in odoo, with a csv file. This works very well when mapping data from legacy databases.

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: 10/25/14, 3:01 AM
Seen: 889 times
Last updated: 3/16/15, 8:10 AM