Add "rejected" status code for StockItem

This commit is contained in:
Oliver Walters 2020-05-03 09:09:17 +10:00
parent 9ee9664e65
commit 29335fa665
2 changed files with 23 additions and 0 deletions

View File

@ -150,6 +150,7 @@ class StockStatus(StatusCode):
ATTENTION = 50 # Item requires attention
DAMAGED = 55 # Item is damaged
DESTROYED = 60 # Item is destroyed
REJECTED = 65 # Item is rejected
LOST = 70 # Item has been lost
RETURNED = 85 # Item has been returned from a customer
@ -167,6 +168,7 @@ class StockStatus(StatusCode):
DAMAGED: _("Damaged"),
DESTROYED: _("Destroyed"),
LOST: _("Lost"),
REJECTED: _("Rejected"),
RETURNED: _("Returned"),
SHIPPED: _('Shipped'),
ASSIGNED_TO_BUILD: _("Used for Build"),
@ -178,6 +180,7 @@ class StockStatus(StatusCode):
ATTENTION: 'yellow',
DAMAGED: 'red',
DESTROYED: 'red',
REJECTED: 'red',
SHIPPED: 'green',
ASSIGNED_TO_BUILD: 'blue',
ASSIGNED_TO_OTHER_ITEM: 'blue',
@ -195,6 +198,7 @@ class StockStatus(StatusCode):
UNAVAILABLE_CODES = [
DESTROYED,
LOST,
REJECTED,
SHIPPED,
ASSIGNED_TO_BUILD,
ASSIGNED_TO_OTHER_ITEM,

View File

@ -0,0 +1,19 @@
# Generated by Django 3.0.5 on 2020-05-02 23:08
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stock', '0034_auto_20200426_0602'),
]
operations = [
migrations.AlterField(
model_name='stockitem',
name='status',
field=models.PositiveIntegerField(choices=[(10, 'OK'), (50, 'Attention needed'), (55, 'Damaged'), (60, 'Destroyed'), (70, 'Lost'), (65, 'Rejected'), (85, 'Returned'), (110, 'Shipped'), (120, 'Used for Build'), (130, 'Installed in Stock Item')], default=10, validators=[django.core.validators.MinValueValidator(0)]),
),
]