mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add a 'uid' field to StockItem model
- To be used for barcode asociation and lookup
This commit is contained in:
parent
277b28a7e9
commit
ba4a1fd771
18
InvenTree/stock/migrations/0026_stockitem_uid.py
Normal file
18
InvenTree/stock/migrations/0026_stockitem_uid.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.10 on 2020-04-14 12:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0025_auto_20200405_2243'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='stockitem',
|
||||
name='uid',
|
||||
field=models.CharField(blank=True, help_text='Unique identifier field', max_length=128),
|
||||
),
|
||||
]
|
@ -108,6 +108,7 @@ class StockItem(MPTTModel):
|
||||
|
||||
Attributes:
|
||||
parent: Link to another StockItem from which this StockItem was created
|
||||
uid: Field containing a unique-id which is mapped to a third-party identifier (e.g. a barcode)
|
||||
part: Link to the master abstract part that this StockItem is an instance of
|
||||
supplier_part: Link to a specific SupplierPart (optional)
|
||||
location: Where this StockItem is located
|
||||
@ -295,6 +296,8 @@ class StockItem(MPTTModel):
|
||||
}
|
||||
)
|
||||
|
||||
uid = models.CharField(blank=True, max_length=128, help_text=("Unique identifier field"))
|
||||
|
||||
parent = TreeForeignKey('self',
|
||||
on_delete=models.DO_NOTHING,
|
||||
blank=True, null=True,
|
||||
|
Loading…
Reference in New Issue
Block a user