mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add 'allocated' status code to build
- This means that parts have been taken from stock
This commit is contained in:
parent
cd514bf1db
commit
40d8332e7f
19
InvenTree/build/migrations/0011_auto_20190508_0748.py
Normal file
19
InvenTree/build/migrations/0011_auto_20190508_0748.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 2.2 on 2019-05-07 21:48
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('build', '0010_auto_20190505_2233'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='build',
|
||||
name='status',
|
||||
field=models.PositiveIntegerField(choices=[(10, 'Pending'), (20, 'Allocated'), (30, 'Cancelled'), (40, 'Complete')], default=10, validators=[django.core.validators.MinValueValidator(0)]),
|
||||
),
|
||||
]
|
@ -62,11 +62,13 @@ class Build(models.Model):
|
||||
|
||||
# Build status codes
|
||||
PENDING = 10 # Build is pending / active
|
||||
ALLOCATED = 20 # Parts have been removed from stock
|
||||
CANCELLED = 30 # Build was cancelled
|
||||
COMPLETE = 40 # Build is complete
|
||||
|
||||
#: Build status codes
|
||||
BUILD_STATUS_CODES = {PENDING: _("Pending"),
|
||||
ALLOCATED: _("Allocated"),
|
||||
CANCELLED: _("Cancelled"),
|
||||
COMPLETE: _("Complete"),
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% if build.status == build.PENDING %}
|
||||
<span class='label label-info'>
|
||||
{% elif build.status == build.HOLDING %}
|
||||
<span class='label label-warning'>
|
||||
{% elif build.status == build.ALLOCATED %}
|
||||
<span class='label label-primary'>
|
||||
{% elif build.status == build.CANCELLED %}
|
||||
<span class='label label-danger'>
|
||||
{% elif build.status == build.COMPLETE %}
|
||||
|
Loading…
Reference in New Issue
Block a user