It looks like when a new attribute is added to a product that has some variants, Odoo may WIPE OUT all existing variants and recreate them!This means all inventory data, relation to any BOM, etc. are deleted for good!
It happens when Odoo can not figure out what should happen to existing variants when a new attribute is added and AT THE SAME TIME user is providing more than one value for the new attribute. This only happens if the new attribute's setting for "Variant Creation Mode" is set to "Instantly" which is the default setting by the way and something that can not be changed later.
Wiping out data without warning can lead to unexpected loss of data. Is there a way to stop Odoo from deleting and issue an error instead? or at least issue warnings when this is about to happen ?
I just confirmed this also the case in Odoo 17.0
Experimenting more with adding/deleting attributes from a product I found out Odoo actually unlinks existing variants from the product instead of deleting them as initially indicated in my post. It archives them. They stay in sale orders where they were used.
This is still not good we end up with duplicates and all reports will show the old archived variants and the one Odoo created in their place show up as separate products.
Yes, it's not ideal. The "old" variants are archived, as you say, and you would have to do an inventory adjustment to put any stock back to the "new" variant. The archived variants cannot be selected on sales orders (etc.) but it can certainly cause confusion. https://odootricks.tips/using-variants-colour-size-fit/
Facing the same problem. Any solution?
I’m running into this issue with Odoo 19. We have a product with multiple attributes, and if I let Odoo create variants “Instantly”, it generates all 144 possible combinations. In reality, we only sell about 25 of those, and building a complex set of exclusion rules is overwhelming and still might not cover every case.
I looked at the idea of archiving the invalid combinations, but any change to the attributes wipes out that work. Not ideal.
I also tried switching all attribute creation modes to “Never”, hoping I could bypass Odoo’s automatic variant creation and manually create or import only the variants we actually sell. The problem is that Odoo simply won’t let you do that. With creation mode set to “Never”, you can’t manually create variants and you can’t import them either. It seems like Odoo insists on being the only one allowed to create variants.
I’ve spent most of the week trying to find a workable approach that lets us take advantage of the variant and attribute system, especially since the Product Configurator on the Sales side is excellent. But this all or nothing variant creation model is proving to be a real blocker. It feels like a significant oversight in the system.
This seems like a different issue.
"Never" is for a feature or option of a product that is recorded on the sales orders but you don't hold specific inventory for it.
Seems like what you want is for Odoo to create variants "dynamically". It probably doesn't do everything you want, but it's the closest.
I don't want Odoo to create variants for me at all. I want to manage them myself. If I allow "Dynamically", there is no way for the Product Configurator to know that certain combinations aren't available, as if I assume correctly, it will try to create them in that moment.
I'd just like to be able to create or import the variant configurations myself. It just seems that in this case Odoo is "so close", but the feature is just missing one link.
I suppose I could just skip the variants feature all together, and create each variant manually as a product/template but that means that I need to assign the same BOM to multiple products.
You can define an attribute as "dynamically" and block some variants, so that they will not be selectable and won't be created. It's explained here: https://www.odoo.com/documentation/19.0/applications/sales/sales/products_prices/products/variants.html#configure-variants