fix(label): Remove qr_data

This commit is contained in:
Andreas Mieke 2024-04-18 01:00:50 -04:00
parent f44590a9f5
commit 77864ba979
Signed by: zenermerps
SSH key fingerprint: SHA256:Ne+hwc5QIgYlqCuLZ0LV3301Wo/p8UoGOrGC+T6S0t8

View file

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