diff --git a/InvenTree/InvenTree/status_codes.py b/InvenTree/InvenTree/status_codes.py index 3af1b55a45..d26be11333 100644 --- a/InvenTree/InvenTree/status_codes.py +++ b/InvenTree/InvenTree/status_codes.py @@ -168,7 +168,6 @@ class StockStatus(StatusCode): NOT_IN_STOCK = 100 SHIPPED = 110 # Item has been shipped to a customer - ASSIGNED_TO_BUILD = 120 options = { OK: _("OK"), @@ -179,7 +178,6 @@ class StockStatus(StatusCode): REJECTED: _("Rejected"), RETURNED: _("Returned"), SHIPPED: _('Shipped'), - ASSIGNED_TO_BUILD: _("Used for Build"), } colors = { @@ -189,7 +187,6 @@ class StockStatus(StatusCode): DESTROYED: 'red', REJECTED: 'red', SHIPPED: 'green', - ASSIGNED_TO_BUILD: 'blue', } # The following codes correspond to parts that are 'available' or 'in stock' @@ -206,7 +203,6 @@ class StockStatus(StatusCode): LOST, REJECTED, SHIPPED, - ASSIGNED_TO_BUILD, ] # The following codes are available for receiving goods diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 23043d077f..d89b2feccf 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -501,7 +501,6 @@ class BuildItem(models.Model): # TODO - If the item__part object is not trackable, delete the stock item here - item.status = StockStatus.ASSIGNED_TO_BUILD item.build_order = self.build item.save() diff --git a/InvenTree/build/test_build.py b/InvenTree/build/test_build.py index c1fb4a5efd..32ad33dab3 100644 --- a/InvenTree/build/test_build.py +++ b/InvenTree/build/test_build.py @@ -211,15 +211,12 @@ class BuildTest(TestCase): # New stock items created and assigned to the build self.assertEqual(StockItem.objects.get(pk=4).quantity, 50) self.assertEqual(StockItem.objects.get(pk=4).build_order, self.build) - self.assertEqual(StockItem.objects.get(pk=4).status, status.StockStatus.ASSIGNED_TO_BUILD) self.assertEqual(StockItem.objects.get(pk=5).quantity, 50) self.assertEqual(StockItem.objects.get(pk=5).build_order, self.build) - self.assertEqual(StockItem.objects.get(pk=5).status, status.StockStatus.ASSIGNED_TO_BUILD) self.assertEqual(StockItem.objects.get(pk=6).quantity, 250) self.assertEqual(StockItem.objects.get(pk=6).build_order, self.build) - self.assertEqual(StockItem.objects.get(pk=6).status, status.StockStatus.ASSIGNED_TO_BUILD) # And a new stock item created for the build output self.assertEqual(StockItem.objects.get(pk=7).quantity, 1)