Refs #340 -- Allow order changes for paid orders if they don't change the total

This commit is contained in:
Raphael Michel
2017-02-15 18:42:46 +01:00
parent 0db927407d
commit c4bf73c8d6
7 changed files with 49 additions and 10 deletions

View File

@@ -446,8 +446,8 @@ class OrderChange(OrderView):
template_name = 'pretixcontrol/order/change.html'
def dispatch(self, request, *args, **kwargs):
if self.order.status != Order.STATUS_PENDING:
messages.error(self.request, _('This action is only allowed for pending orders.'))
if self.order.status not in (Order.STATUS_PENDING, Order.STATUS_PAID):
messages.error(self.request, _('This action is only allowed for pending or paid orders.'))
return self._redirect_back()
return super().dispatch(request, *args, **kwargs)