mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 13:06:45 +00:00
Supply label width and height to the label printing plugin
This commit is contained in:
parent
223744eba1
commit
e18493a397
@ -419,6 +419,10 @@ class LabelPrintingMixin:
|
|||||||
Arguments:
|
Arguments:
|
||||||
label: A black-and-white pillow Image object
|
label: A black-and-white pillow Image object
|
||||||
|
|
||||||
|
kwargs:
|
||||||
|
length: The length of the label (in mm)
|
||||||
|
width: The width of the label (in mm)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Unimplemented (to be implemented by the particular plugin class)
|
# Unimplemented (to be implemented by the particular plugin class)
|
||||||
|
@ -217,7 +217,7 @@ def print_label(plugin_slug, label_image, label_instance=None, user=None):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
plugin.print_label(label_image)
|
plugin.print_label(label_image, width=label_instance.width, height=label_instance.height)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Plugin threw an error - notify the user who attempted to print
|
# Plugin threw an error - notify the user who attempted to print
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user