Removed "SHIPPED" stock status code

This commit is contained in:
Oliver Walters 2020-08-08 09:16:53 +10:00
parent 54c1f2d9a2
commit 861a2982db
3 changed files with 1 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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