diff --git a/src/pretix/base/services/orders.py b/src/pretix/base/services/orders.py index 8eac8ded0..4ed89e958 100644 --- a/src/pretix/base/services/orders.py +++ b/src/pretix/base/services/orders.py @@ -1306,7 +1306,7 @@ class OrderChangeManager: except SendMailException: logger.exception('Order changed email could not be sent') - def commit(self): + def commit(self, check_quotas=True): if self._committed: # an order change can only be committed once raise OrderError(error_messages['internal']) @@ -1323,7 +1323,8 @@ class OrderChangeManager: with self.order.event.lock(): if self.order.status not in (Order.STATUS_PENDING, Order.STATUS_PAID): raise OrderError(self.error_messages['not_pending_or_paid']) - self._check_quotas() + if check_quotas: + self._check_quotas() self._check_complete_cancel() self._perform_operations() self._recalculate_total_and_payment_fee() diff --git a/src/pretix/control/forms/orders.py b/src/pretix/control/forms/orders.py index 78b441acd..37eee6d3d 100644 --- a/src/pretix/control/forms/orders.py +++ b/src/pretix/control/forms/orders.py @@ -177,6 +177,10 @@ class OtherOperationsForm(forms.Form): 'Send an email to the customer notifying that their order has been changed.' ) ) + ignore_quotas = forms.BooleanField( + label=_('Allow to overbook quotas when performing this operation'), + required=False, + ) def __init__(self, *args, **kwargs): kwargs.pop('order') diff --git a/src/pretix/control/templates/pretixcontrol/order/change.html b/src/pretix/control/templates/pretixcontrol/order/change.html index 9958d29c7..48f51fe7e 100644 --- a/src/pretix/control/templates/pretixcontrol/order/change.html +++ b/src/pretix/control/templates/pretixcontrol/order/change.html @@ -206,6 +206,9 @@ +