diff --git a/inventree_phomemo/phomemo_label.py b/inventree_phomemo/phomemo_label.py index 0bcd66e..5b2141b 100644 --- a/inventree_phomemo/phomemo_label.py +++ b/inventree_phomemo/phomemo_label.py @@ -42,11 +42,15 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin): port = int(self.get_setting('PORT')) object_to_print = kwargs['label_instance'].object_to_print + key = object_to_print.pk + kind = '' if kwargs['label_instance'].SUBDIR == 'part': tpart = object_to_print + kind = 'part' elif kwargs['label_instance'].SUBDIR == 'stockitem': tpart = object_to_print.part + kind = 'stockitem' else: print(f"!! Unsupported item type: {object_to_print.SUBDIR}") return @@ -58,7 +62,8 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin): 'params': tpart.parameters_map(), 'category': tpart.category.name, 'category_path': tpart.category.pathstring, - 'qr_data': kwargs['qr_data'] + 'kind': kind, + 'ppk': key } # Send the label to the printer