mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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:
parent
7f3ce9b0b1
commit
ee28b4eea5
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)
|
status: Status of this StockItem (ref: InvenTree.status_codes.StockStatus)
|
||||||
notes: Extra notes field
|
notes: Extra notes field
|
||||||
build: Link to a Build (if this stock item was created from a build)
|
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)
|
purchase_order: Link to a PurchaseOrder (if this stock item was created from a PurchaseOrder)
|
||||||
infinite: If True this StockItem can never be exhausted
|
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)
|
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',
|
related_name='build_outputs',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
is_building = models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
)
|
||||||
|
|
||||||
purchase_order = models.ForeignKey(
|
purchase_order = models.ForeignKey(
|
||||||
'order.PurchaseOrder',
|
'order.PurchaseOrder',
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user