2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Allow offloading of label printing to the configured plugin

This commit is contained in:
Oliver
2022-03-24 14:57:01 +11:00
parent f1f07a1977
commit 6c25a5805d
4 changed files with 111 additions and 28 deletions

View File

@ -415,15 +415,6 @@ class LabelPrintingMixin:
def get_printer_name(self):
return self.PRINTER_NAME
def print_labels(self, labels, **kwargs):
"""
Print multiple labels.
Default implementation is to call print_label() for each label,
but it can be overridden if desired.
"""
for label in labels:
self.print_label(label, **kwargs)
def print_label(self, label, **kwargs):
"""
Callback to print a single label