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

What is an external id, and what is its uses?

Subscribe

Get notified when there's activity on this post

This question has been flagged
2 Replies
51398 Views
Avatar
omar


1
Avatar
Discard
Pascal Tremblay

I would say that it is one of the first thing ton manage and learn well in Odoo.

Ilias Patsiaouras

Hello I wanted to ask if the external id is a field of each table in the database or a global one. 
Basically I have some products with and ID: 1,2,3,4,5,6..... but I also have some contacts with ID: 1,2,3,4,5,6,7... 
So initially I thougt external ID is a field that each table in the database of Odoo has, so I imported the products using the ID as the external ID, but when I am trying to import the contacts I am getting an error saying that external ID elready exist. 

So I guess the external ID is a "global" field is that right?
I was thinking if thats correct to convert my IDs from 0,1,2,3,4,.. to product_0,product_1,product_2,contact_0,contact_1,contact_2 
Will something like work?

Ray Carnes (ray)

The External ID is not the same as the Database ID. It is a globally or database wide unique string value. Yes, you can have "my_product.1" and "my_contact.1" and it is good practice to use the name of the model as part of the ID.

Avatar
Ray Carnes
Best Answer

An External ID (also called XML ID) is a string identifier that uniquely identifies a particular record in Odoo.  

They become important when you plan to import data into Odoo.

When you import data, if you supply an External ID, Odoo checks if this record already exists.  If it does not, that line of your import file becomes an INSERT.  If it does exist, that line of your import file becomes an UPDATE.  If you don't supply an External ID (you leave it blank, or just don't supply the field at all), Odoo creates one automatically for you.

They are stored in the ir.model.data model and are not given to records that are created via the Odoo user interface - only for records that are imported (External ID is created or read on import) or exported (External ID is created on export if it doesn't exist already).

You can see the External ID for a record in Developer Mode using the View Metadata option in the Debug Menu.


When you export data, Odoo will ensure External ID's are present for every record in the export file, so you can update the file and import it back into Odoo (using the rules above).


 

13
Avatar
Discard
J C

Clear Ray, and what is the maximum value of the external ID field, like what is the maximum range Odoo allows??

Ray Carnes (ray)

The field is a char field composed two smaller char fields separated by a period character. The first part is normally the name of the module creating the record, or some other prefix. Both char fields can have up to 10,485,760 alpha-numeric characters in total, except the period character. You will run into usability issues before your run into storage issues. After 66 characters in total, the ID won't display properly on the screen and you will have to scroll your browser to see it.

Dipali Tank (dit)

Hello, As we don't have a xml id for records that are added by user interface then if anyone wants to update records that added by user interface, Is there any way?

Ray Carnes (ray)

If you export the records, Odoo will automatically assign them an ID so that if they are re-imported, they will update instead of the import creating new records. Be sure to choose "I want to update data (import-compatible export)" during the export.

Avatar
FREDERICK DARKO
Best Answer

to add to the answer provided by Ray Carnes above. The External ID's work as PRIMARY KEYS (unique identifiers) that enables one to perform  something similar to CRUD (CREATE-READ-UPDATE and DELETE) activities. 
It does not matter the number of times you update, the external ID will ensure the right lines will ONLY be affected. 
when one does not provide/show the EXTERNAL ID during Mass loading/update, the system will treat each round of loading or update as different records or data hence will cause duplications. 

Note to ensure the External ID field is selected during an field or data export . 
Thanks. 

0
Avatar
Discard
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
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