2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-12 18:15:40 +00:00

Added revision and stock item URL for label creation

This commit is contained in:
eeintech
2021-04-14 16:00:28 -04:00
parent a8d22dac62
commit 1bf72ee335
3 changed files with 19 additions and 1 deletions

View File

@ -253,10 +253,12 @@ class StockItemLabel(LabelTemplate):
'part': stock_item.part,
'name': stock_item.part.full_name,
'ipn': stock_item.part.IPN,
'revision': stock_item.part.revision,
'quantity': normalize(stock_item.quantity),
'serial': stock_item.serial,
'uid': stock_item.uid,
'qr_data': stock_item.format_barcode(brief=True),
'qr_url': stock_item.format_barcode(url=True, request=request),
'tests': stock_item.testResultMap()
}