fix(label): Remove qr_data
This commit is contained in:
parent
f44590a9f5
commit
77864ba979
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue