mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Fix weasyprint version (#3539)
* Pin weasyprint version - Revert to 54.3 - Fixes https://github.com/inventree/InvenTree/issues/3528 * Simplify label printing for multiple pages * Simplify PDF generation for multiple report outputs * Add content wrapper div for base label template - Allows more extensibility
This commit is contained in:
@ -233,17 +233,12 @@ class ReportPrintMixin:
|
||||
pages = []
|
||||
|
||||
try:
|
||||
for output in outputs:
|
||||
doc = output.get_document()
|
||||
for page in doc.pages:
|
||||
pages.append(page)
|
||||
|
||||
if len(outputs) > 1:
|
||||
# If more than one output is generated, merge them into a single file
|
||||
for output in outputs:
|
||||
doc = output.get_document()
|
||||
for page in doc.pages:
|
||||
pages.append(page)
|
||||
|
||||
pdf = outputs[0].get_document().copy(pages).write_pdf()
|
||||
else:
|
||||
pdf = outputs[0].get_document().write_pdf()
|
||||
pdf = outputs[0].get_document().copy(pages).write_pdf()
|
||||
|
||||
except TemplateDoesNotExist as e:
|
||||
|
||||
|
Reference in New Issue
Block a user