2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-28 13:46:54 +00:00

Merge pull request #100 from eeintech/qr_code_url

Added URL-style QR code doc
This commit is contained in:
Oliver 2021-04-16 11:09:38 +10:00 committed by GitHub
commit 7d865666fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 1 deletions

View File

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

View File

@ -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 %}
<img class='custom_qr_class' src='{% qrcode qr_url %}'>
{% 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.