2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 02:55:41 +00:00

Implement option to display labels "inline" in the browser

This commit is contained in:
Oliver Walters
2021-08-07 22:09:15 +10:00
parent d77b99c0ca
commit ca9536f687
4 changed files with 9 additions and 3 deletions

View File

@ -109,10 +109,12 @@ class LabelPrintMixin:
else:
pdf = outputs[0].get_document().write_pdf()
inline = common.models.InvenTreeUserSetting.get_setting('LABEL_INLINE', user=request.user)
return InvenTree.helpers.DownloadFile(
pdf,
label_name,
content_type='application/pdf'
content_type='application/pdf',
inline=inline
)