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