From 6a48eaeec89734f9c364f9992c0c2e803d9c306e Mon Sep 17 00:00:00 2001 From: Oliver Lippert Date: Mon, 2 Oct 2023 09:24:41 +0200 Subject: [PATCH] Don't ignore parts without stock in stocktake (#5627) * don't ignore parts without stock in stocktake #5621 * after including 0 stock parts, expect 14 parts to be in stocktake --------- Co-authored-by: Oliver Lippert --- InvenTree/part/stocktake.py | 4 ---- InvenTree/part/test_api.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/InvenTree/part/stocktake.py b/InvenTree/part/stocktake.py index aae3b94f17..f803248c88 100644 --- a/InvenTree/part/stocktake.py +++ b/InvenTree/part/stocktake.py @@ -249,10 +249,6 @@ def generate_stocktake_report(**kwargs): location=location, ) - if stocktake.quantity == 0: - # Skip rows with zero total quantity - continue - total_parts += 1 stocktake_instances.append(stocktake) diff --git a/InvenTree/part/test_api.py b/InvenTree/part/test_api.py index 8d44ab0e93..57af3632cb 100644 --- a/InvenTree/part/test_api.py +++ b/InvenTree/part/test_api.py @@ -3015,7 +3015,7 @@ class PartStocktakeTest(InvenTreeAPITestCase): data = response.data[0] - self.assertEqual(data['part_count'], 8) + self.assertEqual(data['part_count'], 14) self.assertEqual(data['user'], None) self.assertTrue(data['report'].endswith('.csv'))