Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
9151 Visualizzazioni

A product has been created in openerp, when exported, its external ID is 

product.product_product_48

Any chance this external ID could be updated to other value?  We have a list of products from another database, we want to make products's external ID  in openerp the same as in the other database.

 

 

 

Avatar
Abbandona
Autore

apparently, product.product_product_48 could be update to "product.product_product_" from openerp interface, Technical->External Identifiers, (where is the id of that product from another database.

Risposta migliore

Sure.. external_ids are stored in ir_model_data table

external ids are in form : module_name.external_id
so to get all exported ids for product you an run:
select module, name from ir_module_data where module='product';

Acourdingly, you can prepare and modify those records with sql update statement.. 

 

hope it helps...

Avatar
Abbandona
Risposta migliore

No, not by default at least. It is also a bad idea, because OpenERP uses this idea in all sort of refences (in the many2one fields for example). Since the number is generated for you it is generally a bad practice to want to change it and/or base any business logic around it, other than using the api/orm.

For comparing products between 2 databases it is ofter better to compare another column, such as a required/readonly field.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 25
777
2
mar 24
3398
1
feb 22
2165
5
nov 21
12620
1
mar 17
3085