diff --git a/InvenTree/order/forms.py b/InvenTree/order/forms.py index 05cedd9ad3..c110dfadca 100644 --- a/InvenTree/order/forms.py +++ b/InvenTree/order/forms.py @@ -70,7 +70,7 @@ class EditPurchaseOrderForm(HelperForm): 'reference', 'supplier', 'description', - 'URL', + 'link', ] diff --git a/InvenTree/order/migrations/0018_auto_20200406_0151.py b/InvenTree/order/migrations/0018_auto_20200406_0151.py new file mode 100644 index 0000000000..1dfada77f6 --- /dev/null +++ b/InvenTree/order/migrations/0018_auto_20200406_0151.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.10 on 2020-04-06 01:51 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('order', '0017_auto_20200331_1000'), + ] + + operations = [ + migrations.RenameField( + model_name='purchaseorder', + old_name='URL', + new_name='link', + ), + ] diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index 88f1a8d188..9b569aa4cb 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -69,7 +69,7 @@ class Order(models.Model): description = models.CharField(max_length=250, help_text=_('Order description')) - URL = models.URLField(blank=True, help_text=_('Link to external page')) + link = models.URLField(blank=True, help_text=_('Link to external page')) creation_date = models.DateField(blank=True, null=True) diff --git a/InvenTree/order/serializers.py b/InvenTree/order/serializers.py index c4370015bc..ae6ace2148 100644 --- a/InvenTree/order/serializers.py +++ b/InvenTree/order/serializers.py @@ -21,7 +21,7 @@ class POSerializer(InvenTreeModelSerializer): 'supplier', 'reference', 'description', - 'URL', + 'link', 'status', 'notes', ] diff --git a/InvenTree/order/templates/order/order_base.html b/InvenTree/order/templates/order/order_base.html index 80a33fbfa8..6452f8ab2c 100644 --- a/InvenTree/order/templates/order/order_base.html +++ b/InvenTree/order/templates/order/order_base.html @@ -25,9 +25,6 @@ InvenTree | {{ order }}

{{ order }}

{{ order.description }}

- {% if order.URL %} - {{ order.URL }} - {% endif %}

@@ -64,25 +61,37 @@ InvenTree | {{ order }}

{% trans "Purchase Order Details" %}

+ + + {% if order.link %} + + + + + {% endif %} + + {% if order.issue_date %} + {% endif %} {% if order.status == OrderStatus.COMPLETE %} +
{% trans "Supplier" %} {{ order.supplier }}
{% trans "Status" %} {% include "order/order_status.html" %}
External Link{{ order.link }}
{% trans "Created" %} {{ order.creation_date }}{{ order.created_by }}
{% trans "Issued" %} {{ order.issue_date }}
{% trans "Received" %} {{ order.complete_date }}{{ order.received_by }}