Contributors mailing list archives
Re: Transfer/Migrate Product with Variants Keeping External Identifier for product.productby
It is not clear, but I feel that you are doing the export based on Product Template + Attributes, that will later trigger the Variant creation.
I suggest you to instead export/import the Product Variants (product.product), along with the related attribute data, and let the implicit Product Template record be automatically created.
For the record I did a quick test (14.0), and:
- if you import a "MYPRODUCT" Product Template, it has a __import__.MYPRODUCT XMLId and creates a related Product Variant with no XMLId.
- if you import a "MYPRODUCT" Product Variant, it has a __import__.MYPRODUCT XMLId and creates a related Product Template with XMLId __import__.MYPRODUCT_product_template.
This is helpful for that cases where you have relations to Product Template records (BoMs for example).
I hope this helps.
On 10/06/2021 08:57, Aires Silvestre wrote:
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?
COO | Odoo Consultant
tm.+244 913 728 650
Rua Doutor Agostinho Neto, 156, Bairro Azul, Luanda - Angola, Tel: +244 913 728 600 | +244 913 728 650,
Website: www.alien-group.com, Email: firstname.lastname@example.org
Não imprima este email caso não seja estritamente necessário. A Terra agradece-lhe!
Post to: mailto:email@example.com
|Av Doutor Desidério Cambournac 12 • 2710-553 Sintra, Portugal|
Transfer/Migrate Product with Variants Keeping External Identifier for product.productbyAlien Group, Lda, Aires Silvestre
Re: Transfer/Migrate Product with Variants Keeping External Identifier for product.productbyOpen Source Integrators, Daniel Reis
Re: Transfer/Migrate Product with Variants Keeping External Identifier for product.productby "Richard deMeester" <firstname.lastname@example.org> - 10/06/2021 10:40:15 - 2