2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 19:45:46 +00:00

Place uninstalled items back in stock (#4994)

reset the consumed_by field as well as belongs_to, so an uninstalled
item can be reused.

Fixes: #4992
This commit is contained in:
Matt Brown
2023-06-08 22:22:50 +12:00
committed by GitHub
parent 81413e02c4
commit a4b4df5ff4

View File

@ -1261,6 +1261,7 @@ class StockItem(InvenTreeBarcodeMixin, InvenTreeNotesMixin, MetadataMixin, commo
# Mark this stock item as *not* belonging to anyone # Mark this stock item as *not* belonging to anyone
self.belongs_to = None self.belongs_to = None
self.consumed_by = None
self.location = location self.location = location
self.save() self.save()