Different name for csv hat only holds difference
This commit is contained in:
parent
4057c3ffd7
commit
3840ece7a7
@ -59,8 +59,9 @@ def download_csv(request, pk):
|
||||
outgoing_to_csv(invoice, buffer, request.GET.get("difference") is not None)
|
||||
buffer.seek(0)
|
||||
response = HttpResponse(buffer.getvalue(), content_type='text/csv')
|
||||
response['Content-Disposition'] = ('attachment; filename=%s.csv' %
|
||||
urllib.parse.quote(invoice.inventory.date.strftime("%Y%m%d")))
|
||||
response['Content-Disposition'] = ('attachment; filename=%s%s.csv' %
|
||||
(urllib.parse.quote(invoice.inventory.date.strftime("%Y%m%d")),
|
||||
"diff" if request.GET.get("difference") is not None else ""))
|
||||
return response
|
||||
|
||||
@staff_member_required
|
||||
|
Loading…
x
Reference in New Issue
Block a user