mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Alter "URL" to "link" for Company models
This commit is contained in:
parent
789712acbe
commit
a306ad0bc3
@ -53,7 +53,7 @@ class EditSupplierPartForm(HelperForm):
|
|||||||
'description',
|
'description',
|
||||||
'manufacturer',
|
'manufacturer',
|
||||||
'MPN',
|
'MPN',
|
||||||
'URL',
|
'link',
|
||||||
'note',
|
'note',
|
||||||
'base_cost',
|
'base_cost',
|
||||||
'multiple',
|
'multiple',
|
||||||
|
23
InvenTree/company/migrations/0013_auto_20200406_0131.py
Normal file
23
InvenTree/company/migrations/0013_auto_20200406_0131.py
Normal file
@ -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',
|
||||||
|
),
|
||||||
|
]
|
@ -63,7 +63,7 @@ class Company(models.Model):
|
|||||||
address: Postal address
|
address: Postal address
|
||||||
phone: contact phone number
|
phone: contact phone number
|
||||||
email: contact email address
|
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
|
image: Company image / logo
|
||||||
notes: Extra notes about the company
|
notes: Extra notes about the company
|
||||||
is_customer: boolean value, is this company a customer
|
is_customer: boolean value, is this company a customer
|
||||||
@ -88,7 +88,7 @@ class Company(models.Model):
|
|||||||
contact = models.CharField(max_length=100,
|
contact = models.CharField(max_length=100,
|
||||||
blank=True, help_text=_('Point of contact'))
|
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)
|
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)
|
SKU: Stock keeping unit (supplier part number)
|
||||||
manufacturer: Manufacturer name
|
manufacturer: Manufacturer name
|
||||||
MPN: Manufacture part number
|
MPN: Manufacture part number
|
||||||
URL: Link to external website for this part
|
link: Link to external website for this part
|
||||||
description: Descriptive notes field
|
description: Descriptive notes field
|
||||||
note: Longer form note field
|
note: Longer form note field
|
||||||
base_cost: Base charge added to order independent of quantity e.g. "Reeling Fee"
|
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'))
|
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'))
|
description = models.CharField(max_length=250, blank=True, help_text=_('Supplier part description'))
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class CompanySerializer(InvenTreeModelSerializer):
|
|||||||
'address',
|
'address',
|
||||||
'email',
|
'email',
|
||||||
'contact',
|
'contact',
|
||||||
'URL',
|
'link',
|
||||||
'image',
|
'image',
|
||||||
'notes',
|
'notes',
|
||||||
'is_customer',
|
'is_customer',
|
||||||
@ -91,7 +91,7 @@ class SupplierPartSerializer(InvenTreeModelSerializer):
|
|||||||
'manufacturer',
|
'manufacturer',
|
||||||
'description',
|
'description',
|
||||||
'MPN',
|
'MPN',
|
||||||
'URL',
|
'link',
|
||||||
'pricing',
|
'pricing',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -45,27 +45,37 @@ InvenTree | {% trans "Company" %} - {{ company.name }}
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
{% if company.website %}
|
{% if company.website %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Website" %}</td><td><a href="{{ company.website }}">{{ company.website }}</a></td>
|
<td><span class='fas fa-link'></span></td>
|
||||||
|
<td>{% trans "Website" %}</td>
|
||||||
|
<td><a href="{{ company.website }}">{{ company.website }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if company.address %}
|
{% if company.address %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Address" %}</td><td>{{ company.address }}</td>
|
<td><span class='fas fa-map-marked-alt'></span></td>
|
||||||
|
<td>{% trans "Address" %}</td>
|
||||||
|
<td>{{ company.address }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if company.phone %}
|
{% if company.phone %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Phone" %}</td><td>{{ company.phone }}</td>
|
<td><span class='fas fa-phone'></span></td>
|
||||||
|
<td>{% trans "Phone" %}</td>
|
||||||
|
<td>{{ company.phone }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if company.email %}
|
{% if company.email %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Email" %}</td><td>{{ company.email }}</td>
|
<td><span class='fas fa-at'></span></td>
|
||||||
|
<td>{% trans "Email" %}</td>
|
||||||
|
<td>{{ company.email }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if company.contact %}
|
{% if company.contact %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Contact" %}</td><td>{{ company.contact }}</td>
|
<td><span class='fas fa-user'></span></td>
|
||||||
|
<td>{% trans "Contact" %}</td>
|
||||||
|
<td>{{ company.contact }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
|
@ -86,8 +86,8 @@
|
|||||||
title: 'MPN',
|
title: 'MPN',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'URL',
|
field: 'link',
|
||||||
title: '{% trans "URL" %}',
|
title: '{% trans "Link" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return renderLink(value, value);
|
return renderLink(value, value);
|
||||||
|
@ -43,8 +43,8 @@ InvenTree | {% trans "Supplier Part" %}
|
|||||||
</tr>
|
</tr>
|
||||||
<tr><td>{% trans "Supplier" %}</td><td><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr>
|
<tr><td>{% trans "Supplier" %}</td><td><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr>
|
||||||
<tr><td>{% trans "SKU" %}</td><td>{{ part.SKU }}</tr></tr>
|
<tr><td>{% trans "SKU" %}</td><td>{{ part.SKU }}</tr></tr>
|
||||||
{% if part.URL %}
|
{% if part.link %}
|
||||||
<tr><td>{% trans "URL" %}</td><td><a href="{{ part.URL }}">{{ part.URL }}</a></td></tr>
|
<tr><td>{% trans "External Link" %}</td><td><a href="{{ part.link }}">{{ part.link }}</a></td></tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if part.description %}
|
{% if part.description %}
|
||||||
<tr><td>{% trans "Description" %}</td><td>{{ part.description }}</td></tr>
|
<tr><td>{% trans "Description" %}</td><td>{{ part.description }}</td></tr>
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr><td>{% trans "Supplier" %}</td><td><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr>
|
<tr><td>{% trans "Supplier" %}</td><td><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr>
|
||||||
<tr><td>{% trans "SKU" %}</td><td>{{ part.SKU }}</tr></tr>
|
<tr><td>{% trans "SKU" %}</td><td>{{ part.SKU }}</tr></tr>
|
||||||
{% if part.URL %}
|
{% if part.link %}
|
||||||
<tr><td>{% trans "URL" %}</td><td><a href="{{ part.URL }}">{{ part.URL }}</a></td></tr>
|
<tr><td>{% trans "External Link" %}</td><td><a href="{{ part.link }}">{{ part.link }}</a></td></tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if part.description %}
|
{% if part.description %}
|
||||||
<tr><td>{% trans "Description" %}</td><td>{{ part.description }}</td></tr>
|
<tr><td>{% trans "Description" %}</td><td>{{ part.description }}</td></tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user