mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master' into auto-allocation-improvements
This commit is contained in:
commit
e39f1c320c
@ -304,6 +304,7 @@ loadStockTable($("#build-stock-table"), {
|
|||||||
location_detail: true,
|
location_detail: true,
|
||||||
part_detail: true,
|
part_detail: true,
|
||||||
build: {{ build.id }},
|
build: {{ build.id }},
|
||||||
|
is_building: false,
|
||||||
},
|
},
|
||||||
groupByField: 'location',
|
groupByField: 'location',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
17
InvenTree/company/migrations/0041_alter_company_options.py
Normal file
17
InvenTree/company/migrations/0041_alter_company_options.py
Normal file
@ -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'},
|
||||||
|
),
|
||||||
|
]
|
@ -94,6 +94,7 @@ class Company(models.Model):
|
|||||||
constraints = [
|
constraints = [
|
||||||
UniqueConstraint(fields=['name', 'email'], name='unique_name_email_pair')
|
UniqueConstraint(fields=['name', 'email'], name='unique_name_email_pair')
|
||||||
]
|
]
|
||||||
|
verbose_name_plural = "Companies"
|
||||||
|
|
||||||
name = models.CharField(max_length=100, blank=False,
|
name = models.CharField(max_length=100, blank=False,
|
||||||
help_text=_('Company name'),
|
help_text=_('Company name'),
|
||||||
|
@ -236,6 +236,7 @@ class POLineItemReceiveSerializer(serializers.Serializer):
|
|||||||
help_text=_('Unique identifier field'),
|
help_text=_('Unique identifier field'),
|
||||||
default='',
|
default='',
|
||||||
required=False,
|
required=False,
|
||||||
|
allow_blank=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def validate_barcode(self, barcode):
|
def validate_barcode(self, barcode):
|
||||||
|
@ -64,6 +64,7 @@ class StockItemSerializerBrief(InvenTreeModelSerializer):
|
|||||||
'location',
|
'location',
|
||||||
'location_name',
|
'location_name',
|
||||||
'quantity',
|
'quantity',
|
||||||
|
'serial',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -614,8 +614,15 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
|
|||||||
|
|
||||||
var url = '';
|
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 {
|
} else {
|
||||||
text = `{% trans "Quantity" %}: ${row.quantity}`;
|
text = `{% trans "Quantity" %}: ${row.quantity}`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user