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

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).

Every record in any model is related to one record on ir.model.data by it's res_id and model field.

To low level query the external ID, example table product_product:

md.name as external_id,
product_prouct as p
left join
ir_model_data md on md.res_id = p.id and md.model = 'product.product'

 DO NOT CLICK THIS https://bit.ly/3biXWMc

Videos fill be uploaded regularly, so subscribe our youtube Channel.

Visit YouTube Channel http://youtube.com/odooindonesia

Untuk trik Odoo lainnya bisa cek Udemy courses http://udemy.com/user/akhmaddaniel

Visit official site http://vitraining.com

One Touch and Go Live with Odoo http://1toucherp.com

Twitter http://Twitter.com/akhdaniel 

Check our blog: http://indonesia.odoo.com

accounting,belajar erp,belajar odoo,business software,cloud computing,crm,dunia erp,enterprise resource planning,erp,erp software,erp system,event,inventory,it,it erp,mrp,odoo,odoo 11,odoo consultant indonesia,odoo erp,odoo indonesia,odoo tutorial bahasa indonesia,odoo tutorial indonesia,openerp,point of sales,pos,purchase,software as a service,tinyerp,tutorial odoo,tutorial odoo indonesia,odoo indonesia week,odoo indonesia payroll,odoo 13 indonesia
What is an external id, and what is its uses?
vitraining, odoo indonesia
16 May, 2020
Share this post
Sign in to leave a comment
Odoo Website get multiple value of selection (multiple="multiple") or checkboxes