Print label key (#491)

* We now use the plugin key for printing labels

* Bump API version for modern label printing

* Fix typo
This commit is contained in:
Oliver 2024-05-15 20:19:34 +10:00 committed by GitHub
parent 9a6e1e6381
commit 541060aa03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View file

@ -250,8 +250,8 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
if (allowLabelPrinting) {
String model_type = api.supportsModenLabelPrinting ? InvenTreePart().MODEL_TYPE : "part";
String item_key = api.supportsModenLabelPrinting ? "items" : "part";
String model_type = api.supportsModernLabelPrinting ? InvenTreePart().MODEL_TYPE : "part";
String item_key = api.supportsModernLabelPrinting ? "items" : "part";
_labels = await getLabelTemplates(
model_type,

View file

@ -249,8 +249,8 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
if (widget.location != null) {
String model_type = api.supportsModenLabelPrinting ? InvenTreeStockLocation().MODEL_TYPE : "location";
String item_key = api.supportsModenLabelPrinting ? "items" : "location";
String model_type = api.supportsModernLabelPrinting ? InvenTreeStockLocation().MODEL_TYPE : "location";
String item_key = api.supportsModernLabelPrinting ? "items" : "location";
_labels = await getLabelTemplates(
model_type,

View file

@ -266,8 +266,8 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
// Request information on labels available for this stock item
if (allowLabelPrinting) {
String model_type = api.supportsModenLabelPrinting ? InvenTreeStockLocation().MODEL_TYPE : "stock";
String item_key = api.supportsModenLabelPrinting ? "items" : "item";
String model_type = api.supportsModernLabelPrinting ? InvenTreeStockLocation().MODEL_TYPE : "stock";
String item_key = api.supportsModernLabelPrinting ? "items" : "item";
// Clear the existing labels list
_labels = await getLabelTemplates(