mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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
|
||||
self.belongs_to = None
|
||||
self.consumed_by = None
|
||||
self.location = location
|
||||
|
||||
self.save()
|
||||
|
Loading…
Reference in New Issue
Block a user