2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

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', 'part',
'sub_part', 'sub_part',
'quantity', 'quantity',
'reference',
'overage', 'overage',
'note' 'note'
] ]

View File

@ -166,6 +166,7 @@ class BomItemSerializer(InvenTreeModelSerializer):
'sub_part', 'sub_part',
'sub_part_detail', 'sub_part_detail',
'quantity', 'quantity',
'reference',
'price_range', 'price_range',
'overage', 'overage',
'note', '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 // Part quantity
cols.push( cols.push({
{
field: 'quantity', field: 'quantity',
title: 'Required', title: 'Quantity',
searchable: false, searchable: false,
sortable: true, sortable: true,
formatter: function(value, row, index, field) { formatter: function(value, row, index, field) {
@ -88,8 +95,7 @@ function loadBomTable(table, options) {
return quantity; return quantity;
}, },
} });
);
if (!options.editable) { if (!options.editable) {
cols.push( cols.push(