From a4b4df5ff4c4402b96c56d159a7530bf1e66a4a9 Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Thu, 8 Jun 2023 22:22:50 +1200 Subject: [PATCH] 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 --- InvenTree/stock/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index ff53307410..a3c838504e 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -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()