Skip to content

[18.0][FIX] report_csv: prevent crash when docids is None in _render_csv#1126

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
LoayMoh99:fix/report_csv-render-csv-docids-none
May 26, 2026
Merged

[18.0][FIX] report_csv: prevent crash when docids is None in _render_csv#1126
OCA-git-bot merged 1 commit into
OCA:18.0from
LoayMoh99:fix/report_csv-render-csv-docids-none

Conversation

@LoayMoh99
Copy link
Copy Markdown

Fixes #1125

Add a defensive check in _render_csv to avoid calling len() on None
when docids is not provided.

This aligns CSV report rendering with other Odoo report renderers
and prevents a TypeError.

@LoayMoh99 LoayMoh99 changed the title [FIX] report_csv: prevent crash when docids is None in _render_csv [FIX][18.0] report_csv: prevent crash when docids is None in _render_csv Feb 5, 2026
Copy link
Copy Markdown
Member

@flotho flotho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review,
LGTM
Thanks

@LoayMoh99 LoayMoh99 changed the title [FIX][18.0] report_csv: prevent crash when docids is None in _render_csv [18.0][FIX] report_csv: prevent crash when docids is None in _render_csv Feb 16, 2026
@HviorForgeFlow
Copy link
Copy Markdown
Member

fixed in #1123

@HviorForgeFlow
Copy link
Copy Markdown
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-1126-by-HviorForgeFlow-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 718b269 into OCA:18.0 May 26, 2026
13 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 718b269. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][18.0] report_csv: _render_csv fails when docids is None

4 participants