Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

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

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
import
3 Besvarelser
12178 Visninger
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
Kassér
Avatar
Thuy Ngoc
Bedste svar

Hi Steve,

I think this video can help you:

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

1
Avatar
Kassér
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Bedste svar

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

0
Avatar
Kassér
Avatar
paul
Bedste svar

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
Kassér
Steve Stachurski
Forfatter

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
Forfatter

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
Forfatter

"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!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Issue with import and comma in Excel File (odoo 19)
import
Avatar
0
sep. 25
234
Importacion de Atributos y Valores
import
Avatar
Avatar
Avatar
2
maj 25
2257
Import from Winbooks Løst
import
Avatar
Avatar
Avatar
Avatar
Avatar
4
maj 25
6637
can i import journal entries from Excel
import
Avatar
Avatar
1
aug. 24
3417
Odoo 17 Studio
import
Avatar
Avatar
1
feb. 24
3934
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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