-
-
Notifications
You must be signed in to change notification settings - Fork 873
Open
Labels
Description
Module
report_csv
Describe the bug
Rendering a CSV report fails with a TypeError when docids is None.
The _render_csv method assumes docids is always iterable and calls len(docids) without checking its value.
To Reproduce
Affected versions:
Steps to reproduce the behavior:
- Trigger a CSV report rendering without passing
docids _render_csvis called withdocids=None- The method executes
len(docids) - A
TypeErroris raised
Expected behavior
CSV reports should render correctly even when docids is None, consistent with other Odoo report renderers.
Actual behavior
A TypeError is raised and the report rendering fails.
Additional context
Error:
TypeError: object of type 'NoneType' has no len()Code reference:
| res_id = len(docids) == 1 and docids[0] |
Environment:
OS: Linux
Python: 3.x
Odoo: 18.0
Reactions are currently unavailable