Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте 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:

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

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

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
import
3 Відповіді
12201 Переглядів
Аватар
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
Аватар
Відмінити
Аватар
Thuy Ngoc
Найкраща відповідь

Hi Steve,

I think this video can help you:

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

1
Аватар
Відмінити
Аватар
Cybrosys Techno Solutions Pvt.Ltd
Найкраща відповідь

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

0
Аватар
Відмінити
Аватар
paul
Найкраща відповідь

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
Аватар
Відмінити
Steve Stachurski
Автор

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
Автор

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
Автор

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

Реєстрація
Related Posts Відповіді Переглядів Дія
Issue with import and comma in Excel File (odoo 19)
import
Аватар
0
вер. 25
234
Importacion de Atributos y Valores
import
Аватар
Аватар
Аватар
2
трав. 25
2264
Import from Winbooks Вирішено
import
Аватар
Аватар
Аватар
Аватар
Аватар
4
трав. 25
6654
can i import journal entries from Excel
import
Аватар
Аватар
1
серп. 24
3433
Odoo 17 Studio
import
Аватар
Аватар
1
лют. 24
3945
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція 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