diff --git a/inventree_phomemo/phomemo_label.py b/inventree_phomemo/phomemo_label.py index 8176aab..07ee7a0 100644 --- a/inventree_phomemo/phomemo_label.py +++ b/inventree_phomemo/phomemo_label.py @@ -50,7 +50,7 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin): case 'stockitem': tpart = object_to_print.part barcode = '2' + str(object_to_print.pk) - case 'location': + case 'stocklocation': tpart = object_to_print barcode = '3' + str(object_to_print.pk) case 'build': @@ -68,6 +68,8 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin): 'params': tpart.parameters_map() if hasattr(tpart, 'parameters_map') else None, 'category': tpart.category.name if hasattr(tpart, 'category') else None, 'category_path': tpart.category.pathstring if hasattr(tpart, 'category') else None, + 'location': tpart.location.name if hasattr(tpart, 'location') else None, + 'location_path': tpart.location.pathstring if hasattr(tpart, 'location') else None, 'barcode': barcode, 'type': kwargs['label_instance'].SUBDIR }