2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-16 01:08:12 +00:00

Enable input controls in PDF reports (#10969)

* Enable input controls in PDF reports

Modify options passed to WeasyPrint.

* Changelog update for issue #10969.

* Add usage notes for PDF forms to report docs (#10969).
This commit is contained in:
mlam19
2025-12-06 15:35:52 -05:00
committed by GitHub
parent a0cfdd72a5
commit 27fd2bcb8d
3 changed files with 5 additions and 1 deletions

View File

@@ -272,7 +272,7 @@ class ReportTemplateBase(MetadataMixin, InvenTree.models.InvenTreeModel):
bytes: PDF data
"""
html = self.render_as_string(instance, request, context, **kwargs)
pdf = HTML(string=html).write_pdf()
pdf = HTML(string=html).write_pdf(pdf_forms=True)
return pdf