This question has been flagged
1 Reply
7729 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.

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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.

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?

Author

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 :-)

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.