diff --git a/doc/api/resources/orders.rst b/doc/api/resources/orders.rst index 503c7bfd82..929f1d4541 100644 --- a/doc/api/resources/orders.rst +++ b/doc/api/resources/orders.rst @@ -34,6 +34,9 @@ payment_fee_tax_value money (string) Tax value inclu payment_fee_tax_rule integer The ID of the used tax rule (or ``null``) total money (string) Total value of this order comment string Internal comment on this order +checkin_attention boolean If ``True``, the check-in app should show a warning + that this ticket requires special attention if a ticket + of this order is scanned. invoice_address object Invoice address information (can be ``null``) ├ last_modified datetime Last modification date of the address ├ company string Customer company name @@ -88,6 +91,10 @@ downloads list of objects List of ticket First write operations (``…/mark_paid/``, ``…/mark_pending/``, ``…/mark_canceled/``, ``…/mark_expired/``) have been added. The attribute ``invoice_address.internal_reference`` has been added. +.. versionchanged:: 1.13 + + The field ``checkin_attention`` has been added. + .. _order-position-resource: Order position resource @@ -175,6 +182,7 @@ Order endpoints "fees": [], "total": "23.00", "comment": "", + "checkin_attention": false, "invoice_address": { "last_modified": "2017-12-01T10:00:00Z", "is_business": True, @@ -282,6 +290,7 @@ Order endpoints "fees": [], "total": "23.00", "comment": "", + "checkin_attention": false, "invoice_address": { "last_modified": "2017-12-01T10:00:00Z", "company": "Sample company", diff --git a/src/pretix/api/serializers/order.py b/src/pretix/api/serializers/order.py index d1ad465326..ad959f989c 100644 --- a/src/pretix/api/serializers/order.py +++ b/src/pretix/api/serializers/order.py @@ -135,7 +135,7 @@ class OrderSerializer(I18nAwareModelSerializer): model = Order fields = ('code', 'status', 'secret', 'email', 'locale', 'datetime', 'expires', 'payment_date', 'payment_provider', 'fees', 'total', 'comment', 'invoice_address', 'positions', 'downloads', - 'payment_fee', 'payment_fee_tax_rate', 'payment_fee_tax_value') + 'payment_fee', 'payment_fee_tax_rate', 'payment_fee_tax_value', 'checkin_attention') class InlineInvoiceLineSerializer(I18nAwareModelSerializer): diff --git a/src/pretix/base/migrations/0082_auto_20180222_0938.py b/src/pretix/base/migrations/0082_auto_20180222_0938.py new file mode 100644 index 0000000000..96a55a9e77 --- /dev/null +++ b/src/pretix/base/migrations/0082_auto_20180222_0938.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2018-02-22 09:38 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pretixbase', '0081_auto_20180220_1031'), + ] + + operations = [ + migrations.AddField( + model_name='order', + name='checkin_attention', + field=models.BooleanField(default=False, help_text='If you set this, the check-in app will show a visible warning that tickets of this order require special attention. This will not show any details or custom message, so you need to brief your check-in staff how to handle these cases.', verbose_name='Requires special attention'), + ), + migrations.AlterField( + model_name='checkinlist', + name='include_pending', + field=models.BooleanField(default=False, help_text='With this option, people will be able to check in even if the order have not been paid. This only works with pretixdesk 0.3.0 or newer or pretixdroid 1.9 or newer.', verbose_name='Include pending orders'), + ), + ] diff --git a/src/pretix/base/models/orders.py b/src/pretix/base/models/orders.py index d2af4c885c..c0ae60e567 100644 --- a/src/pretix/base/models/orders.py +++ b/src/pretix/base/models/orders.py @@ -162,6 +162,13 @@ class Order(LoggedModel): help_text=_("The text entered in this field will not be visible to the user and is available for your " "convenience.") ) + checkin_attention = models.BooleanField( + verbose_name=_('Requires special attention'), + default=False, + help_text=_('If you set this, the check-in app will show a visible warning that tickets of this order require ' + 'special attention. This will not show any details or custom message, so you need to brief your ' + 'check-in staff how to handle these cases.') + ) expiry_reminder_sent = models.BooleanField( default=False ) diff --git a/src/pretix/control/forms/orders.py b/src/pretix/control/forms/orders.py index e70c83d2cc..bcd04c1119 100644 --- a/src/pretix/control/forms/orders.py +++ b/src/pretix/control/forms/orders.py @@ -62,7 +62,7 @@ class ExporterForm(forms.Form): class CommentForm(I18nModelForm): class Meta: model = Order - fields = ['comment'] + fields = ['comment', 'checkin_attention'] widgets = { 'comment': forms.Textarea(attrs={ 'rows': 3, diff --git a/src/pretix/control/logdisplay.py b/src/pretix/control/logdisplay.py index 2a5c7a92ea..36cfed17bf 100644 --- a/src/pretix/control/logdisplay.py +++ b/src/pretix/control/logdisplay.py @@ -124,6 +124,8 @@ def pretixcontrol_logentry_display(sender: Event, logentry: LogEntry, **kwargs): 'pretix.event.order.invoice.regenerated': _('The invoice has been regenerated.'), 'pretix.event.order.invoice.reissued': _('The invoice has been reissued.'), 'pretix.event.order.comment': _('The order\'s internal comment has been updated.'), + 'pretix.event.order.checkin_attention': _('The order\'s flag to require attention at check-in has been ' + 'toggled.'), 'pretix.event.order.payment.changed': _('The payment method has been changed.'), 'pretix.event.order.email.sent': _('An unidentified type email has been sent.'), 'pretix.event.order.email.custom_sent': _('A custom email has been sent.'), diff --git a/src/pretix/control/templates/pretixcontrol/order/index.html b/src/pretix/control/templates/pretixcontrol/order/index.html index fbe6274b68..fd73aed5c0 100644 --- a/src/pretix/control/templates/pretixcontrol/order/index.html +++ b/src/pretix/control/templates/pretixcontrol/order/index.html @@ -435,6 +435,7 @@ {% csrf_token %}