From 19e45ac2945e3c10c2ac3d267043c59d60e771b6 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Mon, 15 Aug 2016 15:06:26 +0200 Subject: [PATCH] Remove phone numers from invoices (#189) --- .../migrations/0027_auto_20160815_1254.py | 29 +++++++++++++++++++ src/pretix/base/models/orders.py | 1 - .../templates/pretixcontrol/order/index.html | 2 -- src/pretix/presale/forms/checkout.py | 2 +- .../pretixpresale/event/checkout_confirm.html | 2 -- .../templates/pretixpresale/event/order.html | 2 -- 6 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 src/pretix/base/migrations/0027_auto_20160815_1254.py diff --git a/src/pretix/base/migrations/0027_auto_20160815_1254.py b/src/pretix/base/migrations/0027_auto_20160815_1254.py new file mode 100644 index 000000000..b9c882caa --- /dev/null +++ b/src/pretix/base/migrations/0027_auto_20160815_1254.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.8 on 2016-08-15 12:54 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pretixbase', '0026_order_comment'), + ] + + operations = [ + migrations.RemoveField( + model_name='invoiceaddress', + name='phone', + ), + migrations.AlterField( + model_name='invoiceaddress', + name='name', + field=models.CharField(blank=True, max_length=255, verbose_name='Full name'), + ), + migrations.AlterField( + model_name='item', + name='hide_without_voucher', + field=models.BooleanField(default=False, help_text='This product will be hidden from the event page until the user enters a voucher code that is specifically tied to this product (and not via a quota).', verbose_name='This product will only be shown if a voucher matching the product is redeemed.'), + ), + ] diff --git a/src/pretix/base/models/orders.py b/src/pretix/base/models/orders.py index 9fbf83df8..fede16055 100644 --- a/src/pretix/base/models/orders.py +++ b/src/pretix/base/models/orders.py @@ -541,5 +541,4 @@ class InvoiceAddress(models.Model): zipcode = models.CharField(max_length=30, verbose_name=_('ZIP code'), blank=False) city = models.CharField(max_length=255, verbose_name=_('City'), blank=False) country = models.CharField(max_length=255, verbose_name=_('Country'), blank=False) - phone = models.CharField(max_length=255, blank=True, verbose_name=_('Phone number')) vat_id = models.CharField(max_length=255, blank=True, verbose_name=_('VAT ID')) diff --git a/src/pretix/control/templates/pretixcontrol/order/index.html b/src/pretix/control/templates/pretixcontrol/order/index.html index 1e20a2eed..0621054ab 100644 --- a/src/pretix/control/templates/pretixcontrol/order/index.html +++ b/src/pretix/control/templates/pretixcontrol/order/index.html @@ -268,8 +268,6 @@
{{ order.invoice_address.zipcode }} {{ order.invoice_address.city }}
{% trans "Country" %}
{{ order.invoice_address.country }}
-
{% trans "Phone" %}
-
{{ order.invoice_address.phone }}
{% if request.event.settings.invoice_address_vatid %}
{% trans "VAT ID" %}
{{ order.invoice_address.vat_id }}
diff --git a/src/pretix/presale/forms/checkout.py b/src/pretix/presale/forms/checkout.py index c59ec0e66..11ea35656 100644 --- a/src/pretix/presale/forms/checkout.py +++ b/src/pretix/presale/forms/checkout.py @@ -16,7 +16,7 @@ class InvoiceAddressForm(forms.ModelForm): class Meta: model = InvoiceAddress - fields = ('company', 'name', 'street', 'zipcode', 'city', 'country', 'phone', 'vat_id') + fields = ('company', 'name', 'street', 'zipcode', 'city', 'country', 'vat_id') widgets = { 'street': forms.Textarea(attrs={'rows': 2, 'placeholder': _('Street and Number')}), } diff --git a/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html b/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html index 79649a696..ac02927aa 100644 --- a/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html +++ b/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html @@ -82,8 +82,6 @@
{{ addr.zipcode }} {{ addr.city }}
{% trans "Country" %}
{{ addr.country }}
-
{% trans "Phone" %}
-
{{ addr.phone }}
{% if request.event.settings.invoice_address_vatid %}
{% trans "VAT ID" %}
{{ addr.vat_id }}
diff --git a/src/pretix/presale/templates/pretixpresale/event/order.html b/src/pretix/presale/templates/pretixpresale/event/order.html index 82b456736..d05e21219 100644 --- a/src/pretix/presale/templates/pretixpresale/event/order.html +++ b/src/pretix/presale/templates/pretixpresale/event/order.html @@ -167,8 +167,6 @@
{{ order.invoice_address.zipcode }} {{ order.invoice_address.city }}
{% trans "Country" %}
{{ order.invoice_address.country }}
-
{% trans "Phone" %}
-
{{ order.invoice_address.phone }}
{% if request.event.settings.invoice_address_vatid %}
{% trans "VAT ID" %}
{{ order.invoice_address.vat_id }}