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',
|
||||
'manufacturer',
|
||||
'MPN',
|
||||
'URL',
|
||||
'link',
|
||||
'note',
|
||||
'base_cost',
|
||||
'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
|
||||
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'))
|
||||
|
||||
|
@ -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',
|
||||
]
|
||||
|
||||
|
@ -45,27 +45,37 @@ InvenTree | {% trans "Company" %} - {{ company.name }}
|
||||
<table class="table">
|
||||
{% if company.website %}
|
||||
<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>
|
||||
{% endif %}
|
||||
{% if company.address %}
|
||||
<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>
|
||||
{% endif %}
|
||||
{% if company.phone %}
|
||||
<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>
|
||||
{% endif %}
|
||||
{% if company.email %}
|
||||
<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>
|
||||
{% endif %}
|
||||
{% if company.contact %}
|
||||
<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>
|
||||
{% endif %}
|
||||
</table>
|
||||
|
@ -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);
|
||||
|
@ -43,8 +43,8 @@ InvenTree | {% trans "Supplier Part" %}
|
||||
</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>
|
||||
{% if part.URL %}
|
||||
<tr><td>{% trans "URL" %}</td><td><a href="{{ part.URL }}">{{ part.URL }}</a></td></tr>
|
||||
{% if part.link %}
|
||||
<tr><td>{% trans "External Link" %}</td><td><a href="{{ part.link }}">{{ part.link }}</a></td></tr>
|
||||
{% endif %}
|
||||
{% if part.description %}
|
||||
<tr><td>{% trans "Description" %}</td><td>{{ part.description }}</td></tr>
|
||||
|
@ -20,8 +20,8 @@
|
||||
</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>
|
||||
{% if part.URL %}
|
||||
<tr><td>{% trans "URL" %}</td><td><a href="{{ part.URL }}">{{ part.URL }}</a></td></tr>
|
||||
{% if part.link %}
|
||||
<tr><td>{% trans "External Link" %}</td><td><a href="{{ part.link }}">{{ part.link }}</a></td></tr>
|
||||
{% endif %}
|
||||
{% if part.description %}
|
||||
<tr><td>{% trans "Description" %}</td><td>{{ part.description }}</td></tr>
|
||||
|
Loading…
Reference in New Issue
Block a user