Copy ItemVariation.limit_sales_channels when copying items (#4752)

This commit is contained in:
Raphael Michel
2025-01-21 15:01:28 +01:00
committed by GitHub
parent 87c987fee5
commit 1635118772
2 changed files with 11 additions and 2 deletions

View File

@@ -539,6 +539,8 @@ class ItemCreateForm(I18nModelForm):
v.pk = None
v.item = instance
v.save()
if not variation.all_sales_channels:
v.limit_sales_channels.set(variation.limit_sales_channels.all())
for mv in variation.meta_values.all():
mv.pk = None
mv.variation = v