mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Rename Build.URL -> Build.link
This commit is contained in:
parent
bbe714c8f7
commit
789712acbe
@ -9,6 +9,7 @@
|
|||||||
notes: 'Some simple notes'
|
notes: 'Some simple notes'
|
||||||
status: 10 # PENDING
|
status: 10 # PENDING
|
||||||
creation_date: '2019-03-16'
|
creation_date: '2019-03-16'
|
||||||
|
link: http://www.google.com
|
||||||
|
|
||||||
- model: build.build
|
- model: build.build
|
||||||
fields:
|
fields:
|
||||||
|
@ -25,7 +25,7 @@ class EditBuildForm(HelperForm):
|
|||||||
'quantity',
|
'quantity',
|
||||||
'take_from',
|
'take_from',
|
||||||
'batch',
|
'batch',
|
||||||
'URL',
|
'link',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
18
InvenTree/build/migrations/0011_auto_20200406_0123.py
Normal file
18
InvenTree/build/migrations/0011_auto_20200406_0123.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 2.2.10 on 2020-04-06 01:23
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('build', '0010_auto_20200318_1027'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='build',
|
||||||
|
old_name='URL',
|
||||||
|
new_name='link',
|
||||||
|
),
|
||||||
|
]
|
@ -38,7 +38,7 @@ class Build(models.Model):
|
|||||||
batch: Batch code transferred to build parts (optional)
|
batch: Batch code transferred to build parts (optional)
|
||||||
creation_date: Date the build was created (auto)
|
creation_date: Date the build was created (auto)
|
||||||
completion_date: Date the build was completed
|
completion_date: Date the build was completed
|
||||||
URL: External URL for extra information
|
link: External URL for extra information
|
||||||
notes: Text notes
|
notes: Text notes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ class Build(models.Model):
|
|||||||
related_name='builds_completed'
|
related_name='builds_completed'
|
||||||
)
|
)
|
||||||
|
|
||||||
URL = InvenTreeURLField(blank=True, help_text=_('Link to external URL'))
|
link = InvenTreeURLField(blank=True, help_text=_('Link to external URL'))
|
||||||
|
|
||||||
notes = MarkdownxField(blank=True, help_text=_('Extra build notes'))
|
notes = MarkdownxField(blank=True, help_text=_('Extra build notes'))
|
||||||
|
|
||||||
|
@ -30,7 +30,9 @@ class BuildSerializer(InvenTreeModelSerializer):
|
|||||||
'quantity',
|
'quantity',
|
||||||
'status',
|
'status',
|
||||||
'status_text',
|
'status_text',
|
||||||
'notes']
|
'notes',
|
||||||
|
'link',
|
||||||
|
]
|
||||||
|
|
||||||
read_only_fields = [
|
read_only_fields = [
|
||||||
'status',
|
'status',
|
||||||
|
@ -11,15 +11,21 @@
|
|||||||
|
|
||||||
<table class='table table-striped'>
|
<table class='table table-striped'>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Title" %}</td><td>{{ build.title }}</td>
|
<td></td>
|
||||||
|
<td>{% trans "Title" %}</td>
|
||||||
|
<td>{{ build.title }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Part" %}</td><td><a href="{% url 'part-build' build.part.id %}">{{ build.part.full_name }}</a></td>
|
<td><span class='fas fa-shapes'></span></td>
|
||||||
|
<td>{% trans "Part" %}</td>
|
||||||
|
<td><a href="{% url 'part-build' build.part.id %}">{{ build.part.full_name }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td></td>
|
||||||
<td>{% trans "Quantity" %}</td><td>{{ build.quantity }}</td>
|
<td>{% trans "Quantity" %}</td><td>{{ build.quantity }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><span class='fas fa-map-marker-alt'></span></td>
|
||||||
<td>{% trans "Stock Source" %}</td>
|
<td>{% trans "Stock Source" %}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if build.take_from %}
|
{% if build.take_from %}
|
||||||
@ -30,23 +36,32 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Status" %}</td><td>{% include "build_status.html" with build=build %}</td>
|
<td><span class='fas fa-info'></span></td>
|
||||||
|
<td>{% trans "Status" %}</td>
|
||||||
|
<td>{% include "build_status.html" with build=build %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if build.batch %}
|
{% if build.batch %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Batch" %}</td><td>{{ build.batch }}</td>
|
<td></td>
|
||||||
|
<td>{% trans "Batch" %}</td>
|
||||||
|
<td>{{ build.batch }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if build.URL %}
|
{% if build.link %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "URL" %}</td><td><a href="{{ build.URL }}">{{ build.URL }}</a></td>
|
<td><span class='fas fa-link'></span></td>
|
||||||
|
<td>{% trans "External Link" %}</td>
|
||||||
|
<td><a href="{{ build.link }}">{{ build.link }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Created" %}</td><td>{{ build.creation_date }}</td>
|
<td><span class='fas fa-calendar-alt'></span></td>
|
||||||
|
<td>{% trans "Created" %}</td>
|
||||||
|
<td>{{ build.creation_date }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if build.is_active %}
|
{% if build.is_active %}
|
||||||
<tr>
|
<tr>
|
||||||
|
<td></td>
|
||||||
<td>{% trans "Enough Parts?" %}</td>
|
<td>{% trans "Enough Parts?" %}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if build.can_build %}
|
{% if build.can_build %}
|
||||||
@ -59,7 +74,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if build.completion_date %}
|
{% if build.completion_date %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "Completed" %}</td><td>{{ build.completion_date }}{% if build.completed_by %}<span class='badge'>{{ build.completed_by }}</span>{% endif %}</td>
|
<td><span class='fas fa-calendar-alt'></span></td>
|
||||||
|
<td>{% trans "Completed" %}</td>
|
||||||
|
<td>{{ build.completion_date }}{% if build.completed_by %}<span class='badge'>{{ build.completed_by }}</span>{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
name: 'M2x4 LPHS'
|
name: 'M2x4 LPHS'
|
||||||
description: 'M2x4 low profile head screw'
|
description: 'M2x4 low profile head screw'
|
||||||
category: 8
|
category: 8
|
||||||
|
link: www.acme.com/parts/m2x4lphs
|
||||||
|
|
||||||
- model: part.part
|
- model: part.part
|
||||||
pk: 2
|
pk: 2
|
||||||
|
Loading…
Reference in New Issue
Block a user