diff --git a/InvenTree/InvenTree/status_codes.py b/InvenTree/InvenTree/status_codes.py index d26be11333..2032ec75d8 100644 --- a/InvenTree/InvenTree/status_codes.py +++ b/InvenTree/InvenTree/status_codes.py @@ -167,8 +167,6 @@ class StockStatus(StatusCode): # This can be used as a quick check for filtering NOT_IN_STOCK = 100 - SHIPPED = 110 # Item has been shipped to a customer - options = { OK: _("OK"), ATTENTION: _("Attention needed"), @@ -177,7 +175,6 @@ class StockStatus(StatusCode): LOST: _("Lost"), REJECTED: _("Rejected"), RETURNED: _("Returned"), - SHIPPED: _('Shipped'), } colors = { @@ -186,7 +183,6 @@ class StockStatus(StatusCode): DAMAGED: 'red', DESTROYED: 'red', REJECTED: 'red', - SHIPPED: 'green', } # The following codes correspond to parts that are 'available' or 'in stock' @@ -202,7 +198,6 @@ class StockStatus(StatusCode): DESTROYED, LOST, REJECTED, - SHIPPED, ] # The following codes are available for receiving goods diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index d89b2feccf..89e79761e8 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -21,7 +21,7 @@ from markdownx.models import MarkdownxField from mptt.models import MPTTModel, TreeForeignKey -from InvenTree.status_codes import BuildStatus, StockStatus +from InvenTree.status_codes import BuildStatus from InvenTree.fields import InvenTreeURLField from InvenTree.helpers import decimal2string diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 38e2a35fff..8f4b04e54f 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -219,12 +219,6 @@ class StockItem(MPTTModel): super().clean() - if self.status == StockStatus.ASSIGNED_TO_OTHER_ITEM and self.belongs_to is None: - raise ValidationError({ - 'belongs_to': "Belongs_to field must be specified as statis is marked as ASSIGNED_TO_OTHER_ITEM", - 'status': 'Status cannot be marked as ASSIGNED_TO_OTHER_ITEM if the belongs_to field is not set', - }) - try: if self.part.trackable: # Trackable parts must have integer values for quantity field! @@ -477,7 +471,6 @@ class StockItem(MPTTModel): # Update StockItem fields with new information item.sales_order = order - item.status = StockStatus.SHIPPED item.customer = customer item.location = None