2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

Add a 'uid' field to StockItem model

- To be used for barcode asociation and lookup
This commit is contained in:
Oliver Walters
2020-04-14 22:54:05 +10:00
parent 277b28a7e9
commit ba4a1fd771
2 changed files with 21 additions and 0 deletions

View File

@ -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,