mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 04:35:42 +00:00 
			
		
		
		
	Add a checksum field to the bom line item
This commit is contained in:
		
							
								
								
									
										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) | ||||
|         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 | ||||
|         checksum: Validation checksum for the particular BOM line item | ||||
|     """ | ||||
|  | ||||
|     def get_absolute_url(self): | ||||
| @@ -1154,6 +1155,8 @@ class BomItem(models.Model): | ||||
|     # Note attached to this BOM line item | ||||
|     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): | ||||
|         """ Check validity of the BomItem model. | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user