CSV export for invoices#4894
Open
frjo wants to merge 5 commits into
Open
Conversation
Contributor
|
this works great! maybe we wait for #4890 to get merged then also serialize the tags into the CSV? I think it's ready to go otherwise |
frjo
force-pushed
the
feature/csv-export-invoices
branch
2 times, most recently
from
July 7, 2026 06:52
f3f7aab to
8c9c96c
Compare
Member
Author
|
@wes-otf I have now added invoice tags to the export. |
wes-otf
requested changes
Jul 23, 2026
wes-otf
left a comment
Contributor
There was a problem hiding this comment.
Small change needed that I left a comment for - I couldn't get past the catch all 404 that was really stumping me when testing yesterday
| export_manager = InvoiceExportManager.objects.create( | ||
| user=request_user, total_export=len(qs_ids) | ||
| ) | ||
| export_manager.export_data = export_invoices_to_csv(qs.iterator()) |
Contributor
There was a problem hiding this comment.
After a ton of debugging as to why the iterator call seemed to quietly fail and result in a 404, I found this in the django docs:
The following (the usual chunk_size default when prefetch_related isn't used) seemed to work for me:
Suggested change
| export_manager.export_data = export_invoices_to_csv(qs.iterator()) | |
| export_manager.export_data = export_invoices_to_csv(qs.iterator(chunk_size=2000)) |
Contributor
|
New tags all exported as expected though and the prefetch optimizations will definitely be helpful! |
frjo
force-pushed
the
feature/csv-export-invoices
branch
from
July 24, 2026 06:59
af7f73c to
988adbb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4875
Add CSV export for invoices, implemented in the same way as submission CSV export.
Test Steps