Skip to content

[17.0][FIX] report_csv: prevent crash when docids is None in _render_csv - #1246

Open
prashantpag26 wants to merge 1 commit into
OCA:17.0from
prashantpag26:17.0-fix-report-csv-docids-none
Open

prashantpag26 wants to merge 1 commit into
OCA:17.0from
prashantpag26:17.0-fix-report-csv-docids-none

Conversation

@prashantpag26

Copy link
Copy Markdown

Backport of #1126 (18.0).

_render_csv checks the number of docids with len(docids) == 1. When docids is None, len() raises TypeError. The fix checks that docids is set first, so None and empty values fall through to the same branch as before.

The change is one line, taken from the maintainers' 18.0 commit with its author kept. Existing tests are unchanged.

This was not run in a live Odoo instance.

@oca-cla-bot

oca-cla-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants