From 73282801c9d81d0ab86af7a7dd5049fc69692c57 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 26 Apr 2019 22:41:29 +1000 Subject: [PATCH] Fix for BOM display - Perhaps need to make this cleaner, later on - Is this too much data pushed through the API? --- InvenTree/static/script/inventree/bom.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/static/script/inventree/bom.js b/InvenTree/static/script/inventree/bom.js index 3d8db7d7e2..b749e9b4e0 100644 --- a/InvenTree/static/script/inventree/bom.js +++ b/InvenTree/static/script/inventree/bom.js @@ -87,7 +87,7 @@ function loadBomTable(table, options) { // Part column cols.push( { - field: 'sub_part', + field: 'sub_part_detail', title: 'Part', sortable: true, formatter: function(value, row, index, field) { @@ -99,7 +99,7 @@ function loadBomTable(table, options) { // Part description cols.push( { - field: 'sub_part.description', + field: 'sub_part_detail.description', title: 'Description', } ); @@ -137,14 +137,14 @@ function loadBomTable(table, options) { else { cols.push( { - field: 'sub_part.available_stock', + field: 'sub_part_detail.available_stock', title: 'Available', searchable: false, sortable: true, formatter: function(value, row, index, field) { var text = ""; - if (row.quantity < row.sub_part.available_stock) + if (row.quantity < row.sub_part_detail.available_stock) { text = "" + value + ""; }