diff --git a/src/shop/migrations/0056_auto_20180827_1020.py b/src/shop/migrations/0056_auto_20180827_1020.py new file mode 100644 index 00000000..fa2aa4d0 --- /dev/null +++ b/src/shop/migrations/0056_auto_20180827_1020.py @@ -0,0 +1,22 @@ +# Generated by Django 2.0.4 on 2018-08-27 08:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('shop', '0055_order_customer_address'), + ] + + operations = [ + migrations.RemoveField( + model_name='order', + name='customer_address', + ), + migrations.AddField( + model_name='order', + name='invoice_address', + field=models.TextField(blank=True, help_text='The invoice address for this order. Leave blank to use the email associated with the logged in user.'), + ), + ] diff --git a/src/shop/models.py b/src/shop/models.py index 3aad4399..ef5ea1d9 100644 --- a/src/shop/models.py +++ b/src/shop/models.py @@ -87,12 +87,6 @@ class Order(CreatedUpdatedModel): default=True, ) - customer_address = models.TextField( - help_text=_('The additional customer address for this order'), - blank=True - ) - - CREDIT_CARD = 'credit_card' BLOCKCHAIN = 'blockchain' BANK_TRANSFER = 'bank_transfer' @@ -134,6 +128,11 @@ class Order(CreatedUpdatedModel): blank=True, ) + invoice_address = models.TextField( + help_text=_('The invoice address for this order. Leave blank to use the email associated with the logged in user.'), + blank=True + ) + objects = OrderQuerySet.as_manager() def __str__(self): diff --git a/src/shop/templates/order_detail.html b/src/shop/templates/order_detail.html index 6a43b040..94450ef1 100644 --- a/src/shop/templates/order_detail.html +++ b/src/shop/templates/order_detail.html @@ -68,9 +68,17 @@ {% if not order.open == None %}
{{ invoice.order.customer_address|linebreaks }}
+{{ invoice.order.invoice_address|linebreaks }}
{% else %}