mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add a checksum field to the bom line item
This commit is contained in:
parent
c96c4d16a3
commit
7671eb2b22
18
InvenTree/part/migrations/0017_bomitem_checksum.py
Normal file
18
InvenTree/part/migrations/0017_bomitem_checksum.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 2.2.4 on 2019-09-05 02:57
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('part', '0016_auto_20190820_0257'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='bomitem',
|
||||||
|
name='checksum',
|
||||||
|
field=models.CharField(blank=True, help_text='BOM line checksum', max_length=128),
|
||||||
|
),
|
||||||
|
]
|
@ -1121,6 +1121,7 @@ class BomItem(models.Model):
|
|||||||
reference: BOM reference field (e.g. part designators)
|
reference: BOM reference field (e.g. part designators)
|
||||||
overage: Estimated losses for a Build. Can be expressed as absolute value (e.g. '7') or a percentage (e.g. '2%')
|
overage: Estimated losses for a Build. Can be expressed as absolute value (e.g. '7') or a percentage (e.g. '2%')
|
||||||
note: Note field for this BOM item
|
note: Note field for this BOM item
|
||||||
|
checksum: Validation checksum for the particular BOM line item
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
@ -1154,6 +1155,8 @@ class BomItem(models.Model):
|
|||||||
# Note attached to this BOM line item
|
# Note attached to this BOM line item
|
||||||
note = models.CharField(max_length=500, blank=True, help_text='BOM item notes')
|
note = models.CharField(max_length=500, blank=True, help_text='BOM item notes')
|
||||||
|
|
||||||
|
checksum = models.CharField(max_length=128, blank=True, help_text='BOM line checksum')
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
""" Check validity of the BomItem model.
|
""" Check validity of the BomItem model.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user