Skip to content

Stock Labels

Stock Item Labels

Stock Item label templates are used to generate labels for individual Stock Items.

Creating Stock Item Label Templates

Stock Item label templates are added (and edited) via the admin interface.

Printing Stock Item Labels

Stock Item labels can be printed using the following approaches:

To print a single stock item from the Stock Item detail view, select the Print Label option as shown below:

Print single stock item label Print single stock item label

To print multiple stock items from the Stock table view, select the Print Labels option as shown below:

Print multiple stock item labels Print multiple stock item labels

Context Data

The following variables are made available to the StockItem label template:

Variable Description
item The StockItem object itself
part The Part object which is referenced by the StockItem object
name The name field of the associated Part object
ipn The IPN field of the associated Part object
revision The revision field of the associated Part object
quantity The quantity field of the StockItem object
serial The serial field of the StockItem object
uid The uid field of the StockItem object
tests Dict object of TestResult data associated with the StockItem
parameters Dict object containing the parameters associated with the base Part

URL-style QR code

Stock Item labels support QR code containing the stock item URL, which can be scanned and opened directly on a portable device using the camera or a QR code scanner. To generate a URL-style QR code for stock item in the label HTML template, add the following HTML tag:

<img class='custom_qr_class' src='{% qrcode qr_url %}'>

Make sure to customize the custom_qr_class CSS class to define the position of the QR code on the label.