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.

1

Problem importing customers and contacts using CSV data

By
Rainer Brand
on 2/28/13, 4:43 AM 2,899 views

Hello all,

I'm trying to import customers with their related contacts from an old application into V7 using CSV files and the web client interface. Although importing the customers itself works without any problems, getting the linked contacts seems impossible. I tried all the formats described in the documentation but even using the sample files like

Name,Contacts/Contact Name,Contacts/City
Testcompany1,Theo Test,City1
,Tony Test,City2
Testcompany2,Albert Adams,City3

results in getting the data in but without having them linked (no contact person listed for Testcompany1 or Testcompany2).

Adding fields like company_id/id, is_company, customer, supplier works fine for getting the customers in but does not help for the related contacts. And although my import file with the real data has much more fields and thus is a bit more complex, the import works for the customers as already mentioned (see below):

customer,ref,company_id/id,name,street,zip,city,comment,active,country/id,phone,fax,email,bank_ids/state,bank_ids/acc_number,bank_ids/bank_bic,bank_ids/bank_name,vat,property_payment_term/id,lang,mobile,notification_email_send,is_company

Is there anybody having the same problems? Which field for getting the relation should be in the CSV file? Maybe I've overlooked something quite simple but up to now I can't see it.

Any help is highly appreciated.

1
Nikolaj
On 2/28/13, 5:39 AM

I ran into the exact same problem. It is because companies and contacts have been separated in v7, so you need to import them separately. I only imported my partner companies so far, but the contacts should be a very similar .CSV. Please see the release notes for details - http://v6.openerp.com/node/1269#h.rkpllg84kdus

Thanks for the link, this is quite interesting to read and I will have a more detailed look at it. I already tried to use separate files for the contacts but this didn't work as I couldn't figure out which field I have to use to build up the reference to my already imported customers. I tried many fields using both the import dialogue in the web client or by modifying the csv structure - but unfortunately no success. So I do not have another idea and I'm stuck at the moment.

Rainer Brand
on 2/28/13, 6:34 AM

Yes I always have trouble figuring out which fields to use. It takes forever to figure it out. It would be useful if OpenERP could supply some kind of demo on best practice when using the built in import function. I guess it goes back to the issue of awful documentation for v7. Have you tried creating a demo contact and company and then exporting them?

Nikolaj
on 2/28/13, 7:08 AM

I fully agree regarding regarding the best practices and the documentation is not yet up to v6. The full list above was built up by creating demo data in v7 and exporting back, so I got the exact list of fields. After this did not work for contacts I switched back to the easier structure provided in the documentation - but as you can see, not with good results. By the way - thanks for your time and your help, this is highly appreciated :-)

Rainer Brand
on 2/28/13, 10:08 AM

From looking at the demo data I see this: Contact and Company is imported the same way i.e. the Contact is its own entry, the difference between it and a Company is the is_company field. You can set the Contact to be a child of the company using the child_ids fields.

Nikolaj
on 3/1/13, 7:31 AM

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

0 follower(s)

Stats

Asked: 2/28/13, 4:43 AM
Seen: 2899 times
Last updated: 3/16/15, 8:10 AM