diff --git a/addons/product/product.py b/addons/product/product.py index 49cd3b7fded..5e0abcc691a 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -660,7 +660,8 @@ class product_template(osv.osv): for variant in all_variants: for value_id in variant_id.value_ids: temp_variants.append(variant + [int(value_id)]) - all_variants = temp_variants + if temp_variants: + all_variants = temp_variants # adding an attribute with only one value should not recreate product # write this attribute on every product to make sure we don't lose them