Make vouchers reusable upon cancelation of an Order

Refs #165.
This commit is contained in:
Tobias Kunze
2016-08-08 18:50:16 +02:00
parent 68967fbfda
commit 5667866c9d
2 changed files with 8 additions and 1 deletions

View File

@@ -152,6 +152,11 @@ def cancel_order(order, user=None):
if i:
generate_cancellation(i)
for position in order.positions.all():
if position.voucher:
position.voucher.redeemed = False
position.voucher.save()
return order