From 0d6a3d3b28d72a5420b976ed17dff083736cb7da Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 8 Sep 2019 19:24:08 +1000 Subject: [PATCH] BOM table now refreshes the table rather than the page --- InvenTree/InvenTree/static/script/inventree/bom.js | 4 +++- InvenTree/part/models.py | 1 - InvenTree/stock/models.py | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/InvenTree/static/script/inventree/bom.js b/InvenTree/InvenTree/static/script/inventree/bom.js index 1e66af5c7e..aa64a776f5 100644 --- a/InvenTree/InvenTree/static/script/inventree/bom.js +++ b/InvenTree/InvenTree/static/script/inventree/bom.js @@ -330,7 +330,9 @@ function loadBomTable(table, options) { }, { method: 'PATCH', - reloadOnSuccess: true + success: function() { + reloadBomTable(table); + } } ); }); diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 7cf6776b1d..e9cae5142b 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -81,7 +81,6 @@ class PartCategory(InvenTreeTree): return query - @property def item_count(self): return self.partcount() diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 6c4571d5a3..e9220cabcb 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -76,7 +76,6 @@ class StockLocation(InvenTreeTree): """ return self.stock_item_count(cascade) > 0 - @property def item_count(self): """ Simply returns the number of stock items in this location.