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)