mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add 'note' field to BOM item model
This commit is contained in:
parent
9e5eed5d5e
commit
d5186fc615
18
InvenTree/part/migrations/0004_bomitem_note.py
Normal file
18
InvenTree/part/migrations/0004_bomitem_note.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user