diff --git a/InvenTree/company/forms.py b/InvenTree/company/forms.py index 3190149e24..85424eb3a1 100644 --- a/InvenTree/company/forms.py +++ b/InvenTree/company/forms.py @@ -53,7 +53,7 @@ class EditSupplierPartForm(HelperForm): 'description', 'manufacturer', 'MPN', - 'URL', + 'link', 'note', 'base_cost', 'multiple', diff --git a/InvenTree/company/migrations/0013_auto_20200406_0131.py b/InvenTree/company/migrations/0013_auto_20200406_0131.py new file mode 100644 index 0000000000..6cac8f7678 --- /dev/null +++ b/InvenTree/company/migrations/0013_auto_20200406_0131.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.10 on 2020-04-06 01:31 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('company', '0012_auto_20200318_1114'), + ] + + operations = [ + migrations.RenameField( + model_name='company', + old_name='URL', + new_name='link', + ), + migrations.RenameField( + model_name='supplierpart', + old_name='URL', + new_name='link', + ), + ] diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index b079c084fc..6f14700184 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -63,7 +63,7 @@ class Company(models.Model): address: Postal address phone: contact phone number email: contact email address - URL: Secondary URL e.g. for link to internal Wiki page + link: Secondary URL e.g. for link to internal Wiki page image: Company image / logo notes: Extra notes about the company is_customer: boolean value, is this company a customer @@ -88,7 +88,7 @@ class Company(models.Model): contact = models.CharField(max_length=100, blank=True, help_text=_('Point of contact')) - URL = InvenTreeURLField(blank=True, help_text=_('Link to external company information')) + link = InvenTreeURLField(blank=True, help_text=_('Link to external company information')) image = models.ImageField(upload_to=rename_company_image, max_length=255, null=True, blank=True) @@ -202,7 +202,7 @@ class SupplierPart(models.Model): SKU: Stock keeping unit (supplier part number) manufacturer: Manufacturer name MPN: Manufacture part number - URL: Link to external website for this part + link: Link to external website for this part description: Descriptive notes field note: Longer form note field base_cost: Base charge added to order independent of quantity e.g. "Reeling Fee" @@ -241,7 +241,7 @@ class SupplierPart(models.Model): MPN = models.CharField(max_length=100, blank=True, help_text=_('Manufacturer part number')) - URL = InvenTreeURLField(blank=True, help_text=_('URL for external supplier part link')) + link = InvenTreeURLField(blank=True, help_text=_('URL for external supplier part link')) description = models.CharField(max_length=250, blank=True, help_text=_('Supplier part description')) diff --git a/InvenTree/company/serializers.py b/InvenTree/company/serializers.py index 624a9b6157..161edd286e 100644 --- a/InvenTree/company/serializers.py +++ b/InvenTree/company/serializers.py @@ -47,7 +47,7 @@ class CompanySerializer(InvenTreeModelSerializer): 'address', 'email', 'contact', - 'URL', + 'link', 'image', 'notes', 'is_customer', @@ -91,7 +91,7 @@ class SupplierPartSerializer(InvenTreeModelSerializer): 'manufacturer', 'description', 'MPN', - 'URL', + 'link', 'pricing', ] diff --git a/InvenTree/company/templates/company/company_base.html b/InvenTree/company/templates/company/company_base.html index 9e849e5a47..873d6747be 100644 --- a/InvenTree/company/templates/company/company_base.html +++ b/InvenTree/company/templates/company/company_base.html @@ -45,27 +45,37 @@ InvenTree | {% trans "Company" %} - {{ company.name }} {% if company.website %} - + + + {% endif %} {% if company.address %} - + + + {% endif %} {% if company.phone %} - + + + {% endif %} {% if company.email %} - + + + {% endif %} {% if company.contact %} - + + + {% endif %}
{% trans "Website" %}{{ company.website }}{% trans "Website" %}{{ company.website }}
{% trans "Address" %}{{ company.address }}{% trans "Address" %}{{ company.address }}
{% trans "Phone" %}{{ company.phone }}{% trans "Phone" %}{{ company.phone }}
{% trans "Email" %}{{ company.email }}{% trans "Email" %}{{ company.email }}
{% trans "Contact" %}{{ company.contact }}{% trans "Contact" %}{{ company.contact }}
diff --git a/InvenTree/company/templates/company/detail_part.html b/InvenTree/company/templates/company/detail_part.html index 7eac2b7bfe..83c565943c 100644 --- a/InvenTree/company/templates/company/detail_part.html +++ b/InvenTree/company/templates/company/detail_part.html @@ -86,8 +86,8 @@ title: 'MPN', }, { - field: 'URL', - title: '{% trans "URL" %}', + field: 'link', + title: '{% trans "Link" %}', formatter: function(value, row, index, field) { if (value) { return renderLink(value, value); diff --git a/InvenTree/company/templates/company/supplier_part_base.html b/InvenTree/company/templates/company/supplier_part_base.html index 76f75094f7..33157ed67f 100644 --- a/InvenTree/company/templates/company/supplier_part_base.html +++ b/InvenTree/company/templates/company/supplier_part_base.html @@ -43,8 +43,8 @@ InvenTree | {% trans "Supplier Part" %} {% trans "Supplier" %}{{ part.supplier.name }} {% trans "SKU" %}{{ part.SKU }} - {% if part.URL %} - {% trans "URL" %}{{ part.URL }} + {% if part.link %} + {% trans "External Link" %}{{ part.link }} {% endif %} {% if part.description %} {% trans "Description" %}{{ part.description }} diff --git a/InvenTree/company/templates/company/supplier_part_detail.html b/InvenTree/company/templates/company/supplier_part_detail.html index bb0dee177a..819b4964ba 100644 --- a/InvenTree/company/templates/company/supplier_part_detail.html +++ b/InvenTree/company/templates/company/supplier_part_detail.html @@ -20,8 +20,8 @@ {% trans "Supplier" %}{{ part.supplier.name }} {% trans "SKU" %}{{ part.SKU }} -{% if part.URL %} - {% trans "URL" %}{{ part.URL }} +{% if part.link %} + {% trans "External Link" %}{{ part.link }} {% endif %} {% if part.description %} {% trans "Description" %}{{ part.description }}