This question has been flagged

How do I import products with & without variants in Odoo v11, whilst specifying all the external IDs?

I can import via products.templates.csv and specify attribute_line_ids/attribute_id/id and attribute_line_ids/value_ids/id, but that doesn't let me specify the external ID for the variants.

If I import via product.templates.csv but *don't* specify any variants and instead import them via product.product.csv, then I can specify the external ID for the variants, but I get an additional unwanted variant (with no attributes) automatically generated by the initial import of products.templates.csv with zero variants specified, and a random external ID.

I hope this makes sense? What am I missing?

Avatar
Discard
Best Answer

Odoo 12 brings a good solution to that.

1. Create or import your product templates.

2. Configure their attributes with "Variant Creation Mode" set on "Dynamically", ie variants are generated on demand, when requested in sales/ecommerce orders. BTW This mode is useful if you manage custom products that you only purchase or produce on customer request (no preliminary stock). For perf reasons, Odoo suggests to use this mode when the # of attribute combinations is too high.

3. Import product variants with all their specific data (from menu *Products > Product Variants*): related product template, attribute values (only the name or xmlid of the value is needed), internal reference, barcode, image, standard cost. Not the sales price as it is managed through extra costs on product template attributes or through pricelists that you can create or import afterwards.

Odoo will do the correct matching between the attribute values set on the product template and the ones of the variants, when it comes to select a combination in the product configurator of sales and ecommerce apps.

I also stress out the fact that importing variants as such is only needed if you need the product configurator to select variants. Otherwise you can import all your product items as product templates.

 




Avatar
Discard

I cannot import product.product using product_template_attribute_value_ids many2many to specify the variant. It founds the value multiple times when using names

Best Answer

Hello

Indeed this issue persists till today.

I need a lot to transfer/migrate products with variants from one Odoo database to another and really need to keep the external identifier (mxlid)) for both product.template and product.product records.

Any idea on how to accomplish this. Is this even possible?

Regards

Avatar
Discard
Best Answer

I am facing this same issue in v12. Have you found a solution yet?

Avatar
Discard
Best Answer

I encountered the same problem V11, did you find a solution?

Avatar
Discard
Best Answer

I have struggled with this issue aswell. 

Best suggestion I can give you is:

1. Import product templates (incl. attributes and attribute values)

2. Archive all the product variants 

3. Import the product variants and link them to the template in the field 'product_tmpl_id/id'.

You could also skip step 2, and mark you products in step 3. Than you create a filter that will hide all the products imported in step 3 and archive all the visible products, I would also hide all the product variants of products that have no attribute/attribute values.

Maybe it's also wise to prevent attribute values from creating product variants, you can do this in the attribute settings.

Avatar
Discard