Compare commits

...

3 Commits

Author SHA1 Message Date
dependabot[bot]
b6b5897728 Update django-oauth-toolkit requirement from ==2.3.* to ==3.1.*
Updates the requirements on [django-oauth-toolkit](https://github.com/django-oauth/django-oauth-toolkit) to permit the latest version.
- [Release notes](https://github.com/django-oauth/django-oauth-toolkit/releases)
- [Changelog](https://github.com/django-oauth/django-oauth-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/django-oauth/django-oauth-toolkit/compare/2.3.0...3.1.0)

---
updated-dependencies:
- dependency-name: django-oauth-toolkit
  dependency-version: 3.1.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-03 18:19:07 +00:00
Raphael Michel
25f57f89b0 Order import: Additional warning for disabling test mode (Z#23208360) (#5494) 2025-10-02 19:14:29 +02:00
Martin Gross
22f351cb89 OCM: Ignore already canceled addons in remaining item calculation (Z#23209824) 2025-10-02 10:30:33 +02:00
3 changed files with 14 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ dependencies = [
"django-libsass==0.9",
"django-localflavor==5.0",
"django-markup",
"django-oauth-toolkit==2.3.*",
"django-oauth-toolkit==3.1.*",
"django-otp==1.6.*",
"django-phonenumber-field==7.3.*",
"django-redis==6.0.*",

View File

@@ -2825,7 +2825,7 @@ class OrderChangeManager:
def _check_complete_cancel(self):
current = self.order.positions.count()
cancels = sum([
1 + o.position.addons.count() for o in self._operations if isinstance(o, self.CancelOperation)
1 + o.position.addons.filter(canceled=False).count() for o in self._operations if isinstance(o, self.CancelOperation)
]) + len([
o for o in self._operations if isinstance(o, self.SplitOperation)
])

View File

@@ -21,6 +21,8 @@
#
from django import forms
from django.core.exceptions import ValidationError
from django.utils.functional import lazy
from django.utils.html import format_html
from django.utils.translation import gettext_lazy as _
from pretix.base.modelimport_orders import get_order_import_columns
@@ -71,6 +73,9 @@ class ProcessForm(forms.Form):
raise NotImplementedError() # noqa
format_html_lazy = lazy(format_html, str)
class OrdersProcessForm(ProcessForm):
orders = forms.ChoiceField(
label=_('Import mode'),
@@ -91,7 +96,11 @@ class OrdersProcessForm(ProcessForm):
)
testmode = forms.BooleanField(
label=_('Create orders as test mode orders'),
required=False
required=False,
help_text=format_html_lazy(
'<div class="alert alert-warning" data-display-dependency="#id_testmode" data-inverse>{}</div>',
_('Orders not created in test mode cannot be deleted again after import.')
)
)
def __init__(self, *args, **kwargs):
@@ -100,6 +109,8 @@ class OrdersProcessForm(ProcessForm):
initital['testmode'] = self.event.testmode
kwargs['initial'] = initital
super().__init__(*args, **kwargs)
if not self.event.testmode:
self.fields["testmode"].help_text = ""
def get_columns(self):
return get_order_import_columns(self.event)