From 3eb581e55a60625438a386cd1404dd712428f163 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 12 Aug 2016 10:30:23 +0200 Subject: [PATCH] Add comment field to Orders refs #177 --- .../base/migrations/0026_order_comment.py | 20 +++++++++++++++++++ src/pretix/base/models/orders.py | 7 +++++++ src/pretix/base/models/vouchers.py | 2 ++ 3 files changed, 29 insertions(+) create mode 100644 src/pretix/base/migrations/0026_order_comment.py diff --git a/src/pretix/base/migrations/0026_order_comment.py b/src/pretix/base/migrations/0026_order_comment.py new file mode 100644 index 000000000..b0c45621c --- /dev/null +++ b/src/pretix/base/migrations/0026_order_comment.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.8 on 2016-08-12 08:21 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pretixbase', '0025_auto_20160802_2202'), + ] + + operations = [ + migrations.AddField( + model_name='order', + name='comment', + field=models.TextField(blank=True, help_text='The text entered in this field will not be visible to the user and is available for your convenience.', verbose_name='Comment'), + ), + ] diff --git a/src/pretix/base/models/orders.py b/src/pretix/base/models/orders.py index ec32f40e5..2bdf11d8b 100644 --- a/src/pretix/base/models/orders.py +++ b/src/pretix/base/models/orders.py @@ -74,6 +74,8 @@ class Order(LoggedModel): :type payment_info: str :param total: The total amount of the order, including the payment fee :type total: decimal.Decimal + :param comment: An internal comment that will only be visible to staff, and never displayed to the user + :type comment: str """ STATUS_PENDING = "n" @@ -153,6 +155,11 @@ class Order(LoggedModel): decimal_places=2, max_digits=10, verbose_name=_("Total amount") ) + comment = models.TextField( + blank=True, verbose_name=_("Comment"), + help_text=_("The text entered in this field will not be visible to the user and is available for your " + "convenience.") + ) class Meta: verbose_name = _("Order") diff --git a/src/pretix/base/models/vouchers.py b/src/pretix/base/models/vouchers.py index ca9ce7030..0920718d5 100644 --- a/src/pretix/base/models/vouchers.py +++ b/src/pretix/base/models/vouchers.py @@ -43,6 +43,8 @@ class Voucher(LoggedModel): :type variation: ItemVariation :param quota: If set, the quota to choose an item from :type quota: Quota + :param comment: An internal comment that will only be visible to staff, and never displayed to the user + :type comment: str Various constraints apply: