Add 'virtual' part flag

This commit is contained in:
Oliver Walters 2019-06-18 18:34:07 +10:00
parent f114192264
commit c9c851bead
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.2 on 2019-06-18 08:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('part', '0008_auto_20190618_0042'),
]
operations = [
migrations.AddField(
model_name='part',
name='virtual',
field=models.BooleanField(default=False, help_text='Is this a virtual part, such as a software product or license?'),
),
]

View File

@ -216,6 +216,7 @@ class Part(models.Model):
purchaseable: Can this part be purchased from suppliers?
trackable: Trackable parts can have unique serial numbers assigned, etc, etc
active: Is this part active? Parts are deactivated instead of being deleted
virtual: Is this part "virtual"? e.g. a software product or similar
notes: Additional notes field for this part
"""
@ -377,6 +378,8 @@ class Part(models.Model):
active = models.BooleanField(default=True, help_text='Is this part active?')
virtual = models.BooleanField(default=False, help_text='Is this a virtual part, such as a software product or license?')
notes = models.TextField(blank=True)
bom_checksum = models.CharField(max_length=128, blank=True, help_text='Stored BOM checksum')