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

Add context data to StockItemLabel model

This commit is contained in:
Oliver Walters
2020-08-16 10:24:15 +10:00
parent aefd70ce49
commit 18b3fd3256
2 changed files with 40 additions and 3 deletions

View File

@ -302,6 +302,13 @@ class StockItem(MPTTModel):
}
)
def format_short_barcode(self):
"""
Return a short barcode
"""
return "stockid={pk}".format(pk=self.pk)
uid = models.CharField(blank=True, max_length=128, help_text=("Unique identifier field"))
parent = TreeForeignKey(