Skip to content

Commit

Permalink
[FIX] sale_order_pos_report_plain_text: headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago370 committed Dec 3, 2024
1 parent e646d9e commit dcde11e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ def store_ticket_report(self, sale_order_id, **post):
pdf = request.env.ref(
"sale_order_pos_report_plain_text.action_report_saleorder_compact"
)._render_qweb_pdf(sale_order.ids)[0]
return request.make_response(pdf)
response = request.make_response(pdf)
response.headers["Content-Type"] = "application/pdf"
response.headers[
"Content-Disposition"
] = f'inline; filename="sale_order_{sale_order_id}.pdf"'
return response

0 comments on commit dcde11e

Please sign in to comment.