fix(label): Add type info to label
This commit is contained in:
parent
43c5c8a5ba
commit
fdea2b70d1
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue