Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Import contacts through CSV

Subscribe

Get notified when there's activity on this post

This question has been flagged
importcsv
2 Replies
11948 Views
Avatar
Gerard

Hello,

I have a list of companies in OpenERP 7 with external IDs. Now I want to import their contacts (different csv), but I can't find how to make the relation based on the External ID.

For example i want to import two contacts that belong to company 1. (one-to-many). I tried the following...

"Company / External id","Name","Is a Company"

1,"Person A", "false"

1,"Person B","false"

But sadly no success... can anyone please help me.

0
Avatar
Discard
Avatar
Ludo - 21South
Best Answer

New answer, based on a real life example. This is a simple export from an exisiting database that already had a company and PersonA under that company. Based on the situation you provided, you will only have the first line (id 183, Company1) and need to provide the second line. This is how it should look:

  • "id", "name", "is_company", "parent_id/id", "company_id/id"
  • "__export__.res_partner_183", "Company1","True","","base.main_company"
  • "__export__.res_partner_184","PersonA","False","__export__.res_partner_183","base.main_company"

Of course, you need to replace the actual ID (183 / 184) with your own id's. Note that the parent_id/id field on the first line is actually empty, since it does not have a parent id.

0
Avatar
Discard
Avatar
Gerard
Author Best Answer

Solved:

'parent_id/id' is the same as 'Related Company / External ID' from the pull-down.

File A
"ID","Is a Company","name"
"1","True","Company 1"

File B
"id","name","parent_id/id"
"","Person A","1"
"","Person B","1"
"","Person C","1"

1
Avatar
Discard
Ludo - 21South

I see. The external id is than used for your own company (in the case of a multi-company setting for example). Try to look for "parent_id" on the record instead. Fill in the "__res.... etc." id in that field and you should be fine. Leave the ID field of the new contact persons empty. If it is empty, it will supply the default values for it.

Gerard
Author

Hi Ludo, Thanks again for the quick answer. I went back to basic and started with a fresh install (only the CRM module) to replicate your example. Your first line "__res.partner__.4", "My customer comp" gave an error "Too many dots". :( Can you help out with a working example? I have been at it for a week now and it's driving me nuts. Your help is much appreciated .

Ludo - 21South

I modified my original answer, see above.

Gerard
Author

We are on the same track. I have exported some demo-content and got the same indentifiers. The problem is now which field do I select from the pull-down (screenshot: http://snag.gy/wRY8P.jpg)

Ludo - 21South

I do not know how you import your files, but in general I export a file using the setting "Import compatible", manipulate that file and then at the partner list view use the "Import" button, next to the "Create" to import a file. Simply select the file, click on "Validate" and it shows you a green bar if it could find anything. The only important thing is that you always leave the header of the file intact, because that should show the fields to import. Got no "Import" option next to the Create button? Go to Settings --> Configuration --> General and check the box "Allow users to import data using CSV files" and press apply.

Gerard
Author

That's my way of importing and exporting as well... The only thing missing... is the parent_id... Maybe I was too frustrated to see it, but 'parent_id/id' is the same as 'Related Company / External ID' from the pull-down. Now it works!!! Thank you for your support and patience.

Ludo - 21South

You are welcome. If it helped you, mark the answer as correct.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Disable automatic follow when importing res.partner csv
import csv
Avatar
Avatar
Avatar
3
Jun 20
4858
Enable/disable import rights?
import csv
Avatar
Avatar
1
Nov 18
10353
'utf8' codec can't decode byte error when importing a list of products as a CSV file Solved
import csv
Avatar
Avatar
Avatar
Avatar
Avatar
11
Feb 17
64871
Import csv file with related field other than id, external id, name
import csv importing data from excel file
Avatar
Avatar
Avatar
Avatar
4
Nov 24
12684
How to convert csv files encoding to utf-8 Solved
import csv encoding
Avatar
Avatar
Avatar
2
Nov 24
38793
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now