mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +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:
parent
81413e02c4
commit
a4b4df5ff4
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user