Show BomItem reference field in BOM table

This commit is contained in:
Oliver Walters 2019-06-27 23:57:21 +10:00
parent 4648db6ce5
commit 808d332bda
3 changed files with 30 additions and 22 deletions

View File

@ -136,6 +136,7 @@ class EditBomItemForm(HelperForm):
'part',
'sub_part',
'quantity',
'reference',
'overage',
'note'
]

View File

@ -166,6 +166,7 @@ class BomItemSerializer(InvenTreeModelSerializer):
'sub_part',
'sub_part_detail',
'quantity',
'reference',
'price_range',
'overage',
'note',

View File

@ -63,11 +63,18 @@ function loadBomTable(table, options) {
}
);
// Part reference
cols.push({
field: 'reference',
title: 'Reference',
searchable: true,
sortable: true,
});
// Part quantity
cols.push(
{
cols.push({
field: 'quantity',
title: 'Required',
title: 'Quantity',
searchable: false,
sortable: true,
formatter: function(value, row, index, field) {
@ -88,8 +95,7 @@ function loadBomTable(table, options) {
return quantity;
},
}
);
});
if (!options.editable) {
cols.push(