diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 33a63797ac..823a19ba61 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -225,7 +225,7 @@ class Build(models.Model): 'Removed {n} items to build {m} x {part}'.format( n=item.quantity, m=self.quantity, - part=self.part.name + part=self.part.full_name ) ) @@ -370,7 +370,7 @@ class BuildItem(models.Model): if self.stock_item is not None and self.stock_item.part is not None: if self.stock_item.part not in self.build.part.required_parts(): - errors['stock_item'] = [_("Selected stock item not found in BOM for part '{p}'".format(p=self.build.part.name))] + errors['stock_item'] = [_("Selected stock item not found in BOM for part '{p}'".format(p=self.build.part.full_name))] if self.stock_item is not None and self.quantity > self.stock_item.quantity: errors['quantity'] = [_("Allocated quantity ({n}) must not exceed available quantity ({q})".format( diff --git a/InvenTree/build/serializers.py b/InvenTree/build/serializers.py index 947f3f6dc1..d644cbdc35 100644 --- a/InvenTree/build/serializers.py +++ b/InvenTree/build/serializers.py @@ -44,7 +44,7 @@ class BuildItemSerializer(InvenTreeModelSerializer): """ Serializes a BuildItem object """ part = serializers.IntegerField(source='stock_item.part.pk', read_only=True) - part_name = serializers.CharField(source='stock_item.part.name', read_only=True) + part_name = serializers.CharField(source='stock_item.part.full_name', read_only=True) stock_item_detail = StockItemSerializerBrief(source='stock_item', read_only=True) class Meta: diff --git a/InvenTree/build/templates/build/allocate.html b/InvenTree/build/templates/build/allocate.html index 15061a18b4..9a0f045c68 100644 --- a/InvenTree/build/templates/build/allocate.html +++ b/InvenTree/build/templates/build/allocate.html @@ -14,7 +14,7 @@ InvenTree | Allocate Parts
{{ build.title }}{% include "build_status.html" with build=build %}
-Building {{ build.quantity }} × {{ build.part.name }}
+Building {{ build.quantity }} × {{ build.part.full_name }}
Parent | {{ item.part.name }} |
Child | {{ item.sub_part.name }} |
Parent | {{ item.part.full_name }} |
Child | {{ item.sub_part.full_name }} |
Quantity | {{ item.quantity }} |
Part name | -{{ part.long_name }} | +{{ part.full_name }} | |||||||
Description | @@ -46,6 +45,12 @@{{ part.IPN }} | ||||||||
URL | +{{ part.URL }} | +||||||||
Category |
@@ -147,7 +152,7 @@
$('#activate-part').click(function() {
showQuestionDialog(
'Activate Part?',
- 'Are you sure you wish to reactivate {{ part.long_name }}?',
+ 'Are you sure you wish to reactivate {{ part.full_name }}?',
{
accept_text: 'Activate',
accept: function() {
@@ -169,7 +174,7 @@
$('#deactivate-part').click(function() {
showQuestionDialog(
'Deactivate Part?',
- `Are you sure you wish to deactivate {{ part.long_name }}? + `Are you sure you wish to deactivate {{ part.full_name }}? `, { accept_text: 'Deactivate', @@ -198,16 +203,4 @@ }); }); - $('#stocktake-part').click(function() { - adjustStock({ - action: 'stocktake', - query: { - part: {{ part.id }}, - }, - success: function() { - location.reload(); - } - }); - }); - {% endblock %} diff --git a/InvenTree/part/templates/part/part_app_base.html b/InvenTree/part/templates/part/part_app_base.html index ed3ecfb1b9..95c3f26c28 100644 --- a/InvenTree/part/templates/part/part_app_base.html +++ b/InvenTree/part/templates/part/part_app_base.html @@ -4,7 +4,7 @@ {% block page_title %} {% if part %} -InvenTree | Part - {{ part.long_name }} +InvenTree | Part - {{ part.full_name }} {% elif category %} InvenTree | Part Category - {{ category }} {% else %} diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index d13495bc52..ea3bbc7617 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -7,7 +7,7 @@
{% if part.active == False %}
- This part ({{ part.long_name }}) is not active:
+ This part ({{ part.full_name }}) is not active:
{% endif %}
@@ -24,7 +24,7 @@
- {{ part.long_name }} + {{ part.full_name }}{% if part.variant %}Variant: {{ part.variant }} diff --git a/InvenTree/part/templates/part/partial_delete.html b/InvenTree/part/templates/part/partial_delete.html index e30be8444a..6f2509996b 100644 --- a/InvenTree/part/templates/part/partial_delete.html +++ b/InvenTree/part/templates/part/partial_delete.html @@ -1,10 +1,10 @@ -Are you sure you want to delete part '{{ part.long_name }}'? +Are you sure you want to delete part '{{ part.full_name }}'? {% if part.used_in_count %}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:
There are {{ part.serials.all|length }} unique parts tracked for '{{ part.long_name }}'. Deleting this part will permanently remove this tracking information. +There are {{ part.serials.all|length }} unique parts tracked for '{{ part.full_name }}'. Deleting this part will permanently remove this tracking information. {% endif %} \ No newline at end of file diff --git a/InvenTree/part/templates/part/supplier.html b/InvenTree/part/templates/part/supplier.html index 5112dad913..041d1fd8c7 100644 --- a/InvenTree/part/templates/part/supplier.html +++ b/InvenTree/part/templates/part/supplier.html @@ -48,7 +48,7 @@ $("#supplier-table").bootstrapTable({ sortable: true, search: true, - formatNoMatches: function() { return "No supplier parts available for {{ part.long_name }}"; }, + formatNoMatches: function() { return "No supplier parts available for {{ part.full_name }}"; }, queryParams: function(p) { return { part: {{ part.id }} diff --git a/InvenTree/part/templates/part/track.html b/InvenTree/part/templates/part/track.html index 05f9d366d7..9196715437 100644 --- a/InvenTree/part/templates/part/track.html +++ b/InvenTree/part/templates/part/track.html @@ -4,7 +4,7 @@ {% include 'part/tabs.html' with tab='track' %} -Part tracking for {{ part.long_name }} +Part tracking for {{ part.full_name }}
|