mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Add "is_building" field to StockItem model
- This will be set to TRUE until a stock item has been completed
This commit is contained in:
		
							
								
								
									
										18
									
								
								InvenTree/stock/migrations/0052_stockitem_is_building.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								InvenTree/stock/migrations/0052_stockitem_is_building.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| # Generated by Django 3.0.7 on 2020-10-04 13:12 | ||||
|  | ||||
| from django.db import migrations, models | ||||
|  | ||||
|  | ||||
| class Migration(migrations.Migration): | ||||
|  | ||||
|     dependencies = [ | ||||
|         ('stock', '0051_auto_20200928_0928'), | ||||
|     ] | ||||
|  | ||||
|     operations = [ | ||||
|         migrations.AddField( | ||||
|             model_name='stockitem', | ||||
|             name='is_building', | ||||
|             field=models.BooleanField(default=False), | ||||
|         ), | ||||
|     ] | ||||
| @@ -130,6 +130,7 @@ class StockItem(MPTTModel): | ||||
|         status: Status of this StockItem (ref: InvenTree.status_codes.StockStatus) | ||||
|         notes: Extra notes field | ||||
|         build: Link to a Build (if this stock item was created from a build) | ||||
|         is_building: Boolean field indicating if this stock item is currently being built | ||||
|         purchase_order: Link to a PurchaseOrder (if this stock item was created from a PurchaseOrder) | ||||
|         infinite: If True this StockItem can never be exhausted | ||||
|         sales_order: Link to a SalesOrder object (if the StockItem has been assigned to a SalesOrder) | ||||
| @@ -389,6 +390,10 @@ class StockItem(MPTTModel): | ||||
|         related_name='build_outputs', | ||||
|     ) | ||||
|  | ||||
|     is_building = models.BooleanField( | ||||
|         default=False, | ||||
|     ) | ||||
|  | ||||
|     purchase_order = models.ForeignKey( | ||||
|         'order.PurchaseOrder', | ||||
|         on_delete=models.SET_NULL, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user