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 <oliver@lipperts-web.de>
This commit is contained in:
Oliver Lippert 2023-10-02 09:24:41 +02:00 committed by GitHub
parent e767516c80
commit 6a48eaeec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View File

@ -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)

View File

@ -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'))