2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Add 'variant' field to Part model

- Display 'long_name' which is concatenation of name and variant
This commit is contained in:
Oliver Walters
2019-05-10 22:17:13 +10:00
parent 164f98540d
commit f76f1f54ae
11 changed files with 70 additions and 18 deletions

View File

@@ -4,7 +4,7 @@
{% block page_title %}
{% if part %}
InvenTree | Part - {{ part.name }}
InvenTree | Part - {{ part.long_name }}
{% elif category %}
InvenTree | Part Category - {{ category }}
{% else %}

View File

@@ -7,7 +7,7 @@
<div class="row">
{% if part.active == False %}
<div class='alert alert-danger' style='display: block;'>
This part ({{ part.name }}) is not active:
This part ({{ part.long_name }}) is not active:
</div>
{% endif %}
<div class="col-sm-6">
@@ -24,8 +24,11 @@
</div>
<div class="media-body">
<h4>
{{ part.name }}
{{ part.long_name }}
</h4>
{% if part.variant %}
<p>Variant: {{ part.variant }}</p>
{% endif %}
<p><i>{{ part.description }}</i></p>
<p>
<div class='btn-group'>

View File

@@ -1,4 +1,4 @@
Are you sure you want to delete part '{{ part.name }}'?
Are you sure you want to delete part '{{ part.long_name }}'?
{% if part.used_in_count %}
<p>This part is used in BOMs for {{ part.used_in_count }} other parts. If you delete this part, the BOMs for the following parts will be updated:
@@ -30,5 +30,5 @@ Are you sure you want to delete part '{{ part.name }}'?
{% endif %}
{% if part.serials.all|length > 0 %}
<p>There are {{ part.serials.all|length }} unique parts tracked for '{{ part.name }}'. Deleting this part will permanently remove this tracking information.</p>
<p>There are {{ part.serials.all|length }} unique parts tracked for '{{ part.long_name }}'. Deleting this part will permanently remove this tracking information.</p>
{% endif %}

View File

@@ -48,7 +48,7 @@
$("#supplier-table").bootstrapTable({
sortable: true,
search: true,
formatNoMatches: function() { return "No supplier parts available for {{ part.name }}"; },
formatNoMatches: function() { return "No supplier parts available for {{ part.long_name }}"; },
queryParams: function(p) {
return {
part: {{ part.id }}

View File

@@ -4,7 +4,7 @@
{% include 'part/tabs.html' with tab='track' %}
Part tracking for {{ part.name }}
Part tracking for {{ part.long_name }}
<table class="table table-striped">
<tr>