diff --git a/InvenTree/build/templates/build/detail.html b/InvenTree/build/templates/build/detail.html index 2f707dcc40..8fb259f8a4 100644 --- a/InvenTree/build/templates/build/detail.html +++ b/InvenTree/build/templates/build/detail.html @@ -304,6 +304,7 @@ loadStockTable($("#build-stock-table"), { location_detail: true, part_detail: true, build: {{ build.id }}, + is_building: false, }, groupByField: 'location', buttons: [ diff --git a/InvenTree/company/migrations/0041_alter_company_options.py b/InvenTree/company/migrations/0041_alter_company_options.py new file mode 100644 index 0000000000..40849eed1d --- /dev/null +++ b/InvenTree/company/migrations/0041_alter_company_options.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.5 on 2021-10-04 20:41 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('company', '0040_alter_company_currency'), + ] + + operations = [ + migrations.AlterModelOptions( + name='company', + options={'ordering': ['name'], 'verbose_name_plural': 'Companies'}, + ), + ] diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index b0bb8caaa5..ebe61a74b0 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -94,6 +94,7 @@ class Company(models.Model): constraints = [ UniqueConstraint(fields=['name', 'email'], name='unique_name_email_pair') ] + verbose_name_plural = "Companies" name = models.CharField(max_length=100, blank=False, help_text=_('Company name'), diff --git a/InvenTree/order/serializers.py b/InvenTree/order/serializers.py index 742f759f82..842d422678 100644 --- a/InvenTree/order/serializers.py +++ b/InvenTree/order/serializers.py @@ -236,6 +236,7 @@ class POLineItemReceiveSerializer(serializers.Serializer): help_text=_('Unique identifier field'), default='', required=False, + allow_blank=True, ) def validate_barcode(self, barcode): diff --git a/InvenTree/stock/serializers.py b/InvenTree/stock/serializers.py index 535321ca80..70dd55a4eb 100644 --- a/InvenTree/stock/serializers.py +++ b/InvenTree/stock/serializers.py @@ -64,6 +64,7 @@ class StockItemSerializerBrief(InvenTreeModelSerializer): 'location', 'location_name', 'quantity', + 'serial', ] diff --git a/InvenTree/templates/js/translated/build.js b/InvenTree/templates/js/translated/build.js index 90690cf728..463c3c9ae2 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -614,8 +614,15 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { var url = ''; - if (row.serial && row.quantity == 1) { - text = `{% trans "Serial Number" %}: ${row.serial}`; + + var serial = row.serial; + + if (row.stock_item_detail) { + serial = row.stock_item_detail.serial; + } + + if (serial && row.quantity == 1) { + text = `{% trans "Serial Number" %}: ${serial}`; } else { text = `{% trans "Quantity" %}: ${row.quantity}`; }