Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Transfer/Migrate Product with Variants Keeping External Identifier for product.product

by "Richard deMeester" <richard.demeester@willdooit.com> - 10/06/2021 10:40:15

Hi,

Are you having trouble with generating your own identifiers when you create the products?

Remember, they are just in a table.

If you have data in a module, the external identifiers are fixed by the id in the xml.

When you export anything in Odoo, it will use that identifier, or it will look for what identifier has been used, and if it is not there, will create its own?

So after importing your products in your new database, you could set / override the external identifier to be what it was in your export?

Without knowing what you have done, and what the endgame is exactly, I would have thought it a not too difficult task to replace the identifiers in your new db with what they were in the old db, ensuring that future exports from either source would have the same identifier.

Richard


Richard deMeester

Senior Development Analyst

WilldooIT Pty Ltd

E: richard.demeester@willdooit.com

M: +61 403 76 76 76

P: +61 3 9135 1900

A: 10/435 Williamstown Road, Port Melbourne, Vic 3207

 

 

Making growth through technology easy

 

 

DISCLAIMER | This electronic message together with any attachments is confidential. If you are not the recipient, do not copy, disclose, or use the contents in any way. Please also advise us by e-mail that you have received this message in error and then please destroy this email and any of its attachments. WilldooIT Pty. Ltd. is not responsible for any changes made to this message and/or any attachments after sending by WilldooIT Pty. Ltd. WilldooIT Pty. Ltd. use virus scanning software but exclude all liability for virus or anything similar in this email or attachment.



From: Aires Silvestre <aires.silvestre@alien-group.com>
Sent: Thursday, 10 June 2021 5:57 PM
To: Contributors <contributors@odoo-community.org>
Subject: Transfer/Migrate Product with Variants Keeping External Identifier for product.product
 

Hello everyone

I need to transfer products with variants from one Odoo database to another and have one requirement:

To keep the exact external identifier for both product.template and product.product records. 

I need specially to preserve the external identifier for product.product (Product Variants) because later on I'll have to transfer stock moves and, yes, what is referenced in stock moves, sales, purchases, is product.product (and not product.template).

I've successfully exported products with variants (exported "attribute_line_ids/attribute_id/id" and "attribute_line_ids/value_ids/id") and import them in the destination database and everything is OK, products with variants are replicated but at the end variants (product.product records) have no external identifier, and I need them.

Can someone help, please?

Regards

--
ALIEN GROUP LDA

Aires Silvestre

COO | Odoo Consultant

em.aires.silvestre@alien-group.com

tm.+244 913 728 650

Código QR

Rua Doutor Agostinho Neto, 156, Bairro Azul, Luanda - Angola, Tel: +244 913 728 600 | +244 913 728 650,
Website: www.alien-group.com, Email: geral@alien-group.com

Não imprima este email caso não seja estritamente necessário. A Terra agradece-lhe!

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference