From fdea2b70d197e164f87a29be2885f61c22fa2983 Mon Sep 17 00:00:00 2001 From: Andreas Mieke Date: Sat, 20 Apr 2024 21:58:33 -0400 Subject: [PATCH] fix(label): Add type info to label --- inventree_phomemo/phomemo_label.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inventree_phomemo/phomemo_label.py b/inventree_phomemo/phomemo_label.py index fc661cc..73133fe 100644 --- a/inventree_phomemo/phomemo_label.py +++ b/inventree_phomemo/phomemo_label.py @@ -59,7 +59,7 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin): case _: tpart = object_to_print barcode = '0' + str(object_to_print.pk) - print(f"!! Unsupported item type: {object_to_print.SUBDIR}") + print(f"!! Unsupported item type: {kwargs['label_instance'].SUBDIR}") fields = { 'name': tpart.name, @@ -68,7 +68,8 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin): 'params': tpart.parameters_map(), 'category': tpart.category.name, 'category_path': tpart.category.pathstring, - 'barcode': barcode + 'barcode': barcode, + 'type': kwargs['label_instance'].SUBDIR } data = json.dumps(fields)