Add 'note' field to BOM item model

This commit is contained in:
Oliver Walters 2019-04-14 18:26:11 +10:00
parent 9e5eed5d5e
commit d5186fc615
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2 on 2019-04-14 08:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('part', '0003_auto_20190412_2030'),
]
operations = [
migrations.AddField(
model_name='bomitem',
name='note',
field=models.CharField(blank=True, help_text='Item notes', max_length=100),
),
]

View File

@ -375,6 +375,9 @@ class BomItem(models.Model):
# Quantity required # Quantity required
quantity = models.PositiveIntegerField(default=1, validators=[MinValueValidator(0)]) quantity = models.PositiveIntegerField(default=1, validators=[MinValueValidator(0)])
# Note attached to this BOM line item
note = models.CharField(max_length=100, blank=True, help_text='Item notes')
def clean(self): def clean(self):
# A part cannot refer to itself in its BOM # A part cannot refer to itself in its BOM