Order change form: Allow to add multiple identical positions (Z#23227479) (#6044)

* Order change form: Allow to add multiple identical positions (Z#23227479)

* New implementation
This commit is contained in:
Raphael Michel
2026-04-01 11:54:48 +02:00
committed by GitHub
parent 8c251029b9
commit ed1459b1dd
6 changed files with 95 additions and 55 deletions

View File

@@ -2059,12 +2059,13 @@ class OrderChange(OrderView):
else:
variation = None
try:
ocm.add_position(item, variation,
f.cleaned_data['price'],
f.cleaned_data.get('addon_to'),
f.cleaned_data.get('subevent'),
f.cleaned_data.get('seat'),
f.cleaned_data.get('used_membership'))
for i in range(f.cleaned_data.get("count", 1)):
ocm.add_position(item, variation,
f.cleaned_data['price'],
f.cleaned_data.get('addon_to'),
f.cleaned_data.get('subevent'),
f.cleaned_data.get('seat'),
f.cleaned_data.get('used_membership'))
except OrderError as e:
f.custom_error = str(e)
return False