From af8305b52879a6792cf0a9180b43379fecefdfea Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 15 Apr 2021 10:31:36 -0400 Subject: [PATCH] Added URL-style QR code doc --- docs/releases/0.2.1.md | 9 ++++++++- docs/report/labels.md | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/releases/0.2.1.md b/docs/releases/0.2.1.md index 9144e9a..ac61361 100644 --- a/docs/releases/0.2.1.md +++ b/docs/releases/0.2.1.md @@ -25,7 +25,14 @@ stored independently. Users can use either manufacturer or supplier parts as sourcing information for a part. Soon, InvenTree will allow the use of manufacturer data directly in purchase orders. -Details on how to create and manage manufacturer parts were added [here](../../companies/manufacturer/#add-manufacturer-part). +Details on how to create and manage manufacturer parts were added +[here](../../companies/manufacturer/#add-manufacturer-part). + +### URL-style QR Code for StockItem + +[#1462](https://github.com/inventree/InvenTree/pull/1417) adds the ability to +create a QR code containing the URL of a StockItem, which can be opened directly +on a portable device using the camera or a QR code scanner. More details [here](../../report/labels#url-style-qr-code). ## Major Bug Fixes diff --git a/docs/report/labels.md b/docs/report/labels.md index 1439530..177345a 100644 --- a/docs/report/labels.md +++ b/docs/report/labels.md @@ -219,11 +219,28 @@ The following variables are made available to the StockItem label template: | 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 | +### URL-style QR code + +Stock Item labels support [QR code](../barcodes#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](../labels#label-templates), add the +following HTML tag: + +``` html +{% raw %} + +{% endraw %} +``` + +Make sure to customize the `custom_qr_class` CSS class to define the position of the QR code +on the label. + ## Stock Location Labels Stock Location label templates are used to generate labels for individual Stock Locations.