mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Add Order.custom_followup_at (#2124)
This commit is contained in:
@@ -205,6 +205,10 @@ class OrderFilterForm(FilterForm):
|
||||
('na', _('Approved, payment pending')),
|
||||
('pa', _('Approval pending')),
|
||||
)),
|
||||
(_('Follow-up date'), (
|
||||
('custom_followup_at', _('Follow-up configured')),
|
||||
('custom_followup_due', _('Follow-up due')),
|
||||
)),
|
||||
('testmode', _('Test mode')),
|
||||
),
|
||||
required=False,
|
||||
@@ -324,6 +328,14 @@ class OrderFilterForm(FilterForm):
|
||||
status=Order.STATUS_PENDING,
|
||||
require_approval=False
|
||||
)
|
||||
elif s == 'custom_followup_at':
|
||||
qs = qs.filter(
|
||||
custom_followup_at__isnull=False
|
||||
)
|
||||
elif s == 'custom_followup_due':
|
||||
qs = qs.filter(
|
||||
custom_followup_at__lte=now().astimezone(get_current_timezone()).date()
|
||||
)
|
||||
elif s == 'testmode':
|
||||
qs = qs.filter(
|
||||
testmode=True
|
||||
|
||||
@@ -230,12 +230,13 @@ class ExporterForm(forms.Form):
|
||||
class CommentForm(I18nModelForm):
|
||||
class Meta:
|
||||
model = Order
|
||||
fields = ['comment', 'checkin_attention']
|
||||
fields = ['comment', 'checkin_attention', 'custom_followup_at']
|
||||
widgets = {
|
||||
'comment': forms.Textarea(attrs={
|
||||
'rows': 3,
|
||||
'class': 'helper-width-100',
|
||||
}),
|
||||
'custom_followup_at': DatePickerWidget(),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user