mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Change "ALLOCATED" to "PRODUCTION"
This commit is contained in:
parent
ac79e131bc
commit
2df0f03a9a
@ -214,25 +214,25 @@ class BuildStatus(StatusCode):
|
||||
|
||||
# Build status codes
|
||||
PENDING = 10 # Build is pending / active
|
||||
ALLOCATED = 20 # Parts have been removed from stock
|
||||
PRODUCTION = 20 # BuildOrder is in production
|
||||
CANCELLED = 30 # Build was cancelled
|
||||
COMPLETE = 40 # Build is complete
|
||||
|
||||
options = {
|
||||
PENDING: _("Pending"),
|
||||
ALLOCATED: _("Allocated"),
|
||||
PRODUCTION: _("Production"),
|
||||
CANCELLED: _("Cancelled"),
|
||||
COMPLETE: _("Complete"),
|
||||
}
|
||||
|
||||
colors = {
|
||||
PENDING: 'blue',
|
||||
ALLOCATED: 'blue',
|
||||
PRODUCTION: 'blue',
|
||||
COMPLETE: 'green',
|
||||
CANCELLED: 'red',
|
||||
}
|
||||
|
||||
ACTIVE_CODES = [
|
||||
PENDING,
|
||||
ALLOCATED
|
||||
PRODUCTION,
|
||||
]
|
||||
|
19
InvenTree/build/migrations/0023_auto_20201020_1009.py
Normal file
19
InvenTree/build/migrations/0023_auto_20201020_1009.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.0.7 on 2020-10-20 10:09
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('build', '0022_auto_20201020_0953'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='build',
|
||||
name='status',
|
||||
field=models.PositiveIntegerField(choices=[(10, 'Pending'), (20, 'Production'), (30, 'Cancelled'), (40, 'Complete')], default=10, help_text='Build status code', validators=[django.core.validators.MinValueValidator(0)], verbose_name='Build Status'),
|
||||
),
|
||||
]
|
@ -440,6 +440,15 @@ class BuildCreate(AjaxCreateView):
|
||||
'success': _('Created new build'),
|
||||
}
|
||||
|
||||
def post_save(self, new_object):
|
||||
"""
|
||||
Called immediately after the build has been created.
|
||||
"""
|
||||
|
||||
build = new_object
|
||||
|
||||
print("Created:", build)
|
||||
|
||||
|
||||
class BuildUpdate(AjaxUpdateView):
|
||||
""" View for editing a Build object """
|
||||
|
Loading…
Reference in New Issue
Block a user