mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Allow stocktake quantity to be zero (#5644)
- Backport of https://github.com/inventree/InvenTree/pull/5627/ Co-authored-by: Oliver Lippert <oliver@allesit.de>
This commit is contained in:
parent
39e682cd45
commit
fe9a56a5c1
@ -314,10 +314,6 @@ def generate_stocktake_report(**kwargs):
|
||||
# Create a new stocktake for this part (do not commit, this will take place later on)
|
||||
stocktake = perform_stocktake(p, user, commit=False)
|
||||
|
||||
if stocktake.quantity == 0:
|
||||
# Skip rows with zero total quantity
|
||||
continue
|
||||
|
||||
total_parts += 1
|
||||
|
||||
stocktake_instances.append(stocktake)
|
||||
|
@ -2966,7 +2966,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'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user