From c2a35b6656bc3ecdc8465be114d067cf250ac344 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 28 Apr 2019 23:00:38 +1000 Subject: [PATCH] Add 'active' field to Part model --- InvenTree/part/migrations/0012_part_active.py | 18 ++++++++++++++++++ InvenTree/part/models.py | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 InvenTree/part/migrations/0012_part_active.py diff --git a/InvenTree/part/migrations/0012_part_active.py b/InvenTree/part/migrations/0012_part_active.py new file mode 100644 index 0000000000..c2f3b55f6c --- /dev/null +++ b/InvenTree/part/migrations/0012_part_active.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2 on 2019-04-28 13:00 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0011_auto_20190428_0841'), + ] + + operations = [ + migrations.AddField( + model_name='part', + name='active', + field=models.BooleanField(default=True, help_text='Is this part active?'), + ), + ] diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 887c983511..04d5471f92 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -171,6 +171,9 @@ class Part(models.Model): # Can this part be sold to customers? salable = models.BooleanField(default=False, help_text="Can this part be sold to customers?") + # Is this part active? + active = models.BooleanField(default=True, help_text='Is this part active?') + notes = models.TextField(blank=True) def __str__(self):