Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

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

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Importing records--is there an option to create a related record if it does not exist yet?

Subscribe

Get notified when there's activity on this post

This question has been flagged
import
3 Replies
12173 Views
Avatar
Steve Stachurski

I'm trying to import data from a flat CSV file, but the CSV file contains some relational information. The rows mostly represent "contacts" but contacts also have sales people associated with them, companies, etc.

So far my database is completely empty of any records and I want to start by importing contacts. When trying to validate the file, I get a bunch of errors like, "No matching record found for name 'Foo Bar' in field 'Salesperson'". Is it possible to configure the import process to create a matching salesperson and link up the records?

I guess the alternative, to do things the way openerp/odoo expects, is to kind of look at the graph of the relationships of contacts and import records from the "outside -> in" in the hierarchy.

0
Avatar
Discard
Avatar
Thuy Ngoc
Best Answer

Hi Steve,

I think this video can help you:

https://www.youtube.com/watch?v=UOBxxnYDIsM&list=PLSKcWRTtEl5qzvRaI-VTGavfReiHS_EEb&index=1

1
Avatar
Discard
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi ,
Refer the app:https://apps.odoo.com/apps/modules/13.0/create_not_exist/

0
Avatar
Discard
Avatar
paul
Best Answer

Yes, generically the import process has the ability to create related records via the csv import.  For examle, I create related orderpoint records when I import new products.  I haven't tried to import your specific example of contacts and sales people. I recommend creating a few test contact and salesperson (users) records via the standard user interface then exporting those records to see how OpenERP formats the csv file.

0
Avatar
Discard
Steve Stachurski
Author

I tried going to contacts, making a selection from the list and exporting. I chose to export the fields Salesperson, Name and Notes. Salesperson because I wanted to figure out how to relate contacts to sales people, Name because it's required, and Notes just because. The resultant file was called res.partner.csv which is a little weird...I wanted to export Contacts, not Partners, and I thought these record types were distinct. Also, the Salespeson field seems to have been exported as user_id/id, and filled with values like __export__.res_users_9, so this does not really help with setting up a format to import and create new sales people during contact import time. I'm assuming even if I replaced the ID number for a given user_id/id field, to a new one, that would not work because it does not include information like the sales person's name. Indeed, if I use the given csv file format and try to import a new one containing one row with a new user_id/id, I get this message: "No matching record found for external id '__export__.res_users_90' in field 'Salesperson' at row 2" where 90 is an ID for a user who doesn't exist yet. odoo seems to have identified user_id/id header to import into Salesperson / External ID field.

paul

The reason that the export file starts with res.partner is that the database model that stores contacts is called "res.partner" (fyi, you can see the respective model used by looking at the URL parameter 'model'). In addition, following similar reasoning...the Salesperson foreign key is stored in a field called 'user_id' of the res.partner model. So, that is why the export field starts with 'user_id'. When importing a related record (like Salesperson) as part of the contact import you may not be able to define the id of the new salesperson records (you will have to let OpenERP generate the id upon record creation). But you should still be able to define attributes of the salesperson (e.g. name, etc.) via this import of the contact csv file.

Steve Stachurski
Author

This is only tangentially related but maybe you can answer this for me: I was under the impression that contacts and partners were distinct types in odoo. Actually you have to install a separate app to get support for "just plain contacts." I was planning on importing all records from my old CRM system as contacts and then only converting those that matched the condition of what it means to be "partner" into the partner model--for example a customer, supplier, or qualified lead. So what is it that distinguishes contacts from partners?

Steve Stachurski
Author

"you should still be able to define attributes of the salesperson (e.g. name, etc.)" I'm sorry if exactly *how* I should do this should be obvious, but I can't figure it out. I've tried column headers like user_id/name, user_name/name, in an attempt to figure out how to traverse model relationships but odoo odes not seem to know what I'm trying to do, or if I just tell odoo to import that column as "Salesperson", then I get the same error, No matching record found for name 'Foo' in field 'Salesperson' at row 2.

paul

hmm, you are correct about not being able to import salesperson details info. usually there will be dropdown selections in the import screen for the additional details of the related entity (e.g. user_id/name). but I can't find them for this import. ....so you're not going crazy.

paul

In regards to your tangential question about contacts vs partners...both are derived from the same database model of res.partners. The difference between the two is more based on how they are used in OpenERP. After looking at the "contacts" app it only adds more views (forms and menus) of the same res.partner database records. The term 'partner' is sorta the generic term used by OpenERP to represent 3rd party entities (e.g. not Company or users). For example, a partner record can either be a Customer and/or Supplier. I would say that Partners usually represent the entity with whom the Company does business. Contacts provide for the mechanism of relating res.partner records to each other. For example, if John Doe is the sales manager of a supplier then you could create a "Contact" for John Doe and relate him to the existing supplier Partner record.

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
Issue with import and comma in Excel File (odoo 19)
import
Avatar
0
सित॰ 25
234
Importacion de Atributos y Valores
import
Avatar
Avatar
Avatar
2
मई 25
2254
Import from Winbooks Solved
import
Avatar
Avatar
Avatar
Avatar
Avatar
4
मई 25
6621
can i import journal entries from Excel
import
Avatar
Avatar
1
अग॰ 24
3409
Odoo 17 Studio
import
Avatar
Avatar
1
फ़र॰ 24
3929
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة 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, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

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