mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Removed "SHIPPED" stock status code
This commit is contained in:
parent
54c1f2d9a2
commit
861a2982db
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user