Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion report_csv/models/ir_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _render_csv(self, report_ref, docids, data):
report_sudo = self._get_report(report_ref)
report_model_name = f"report.{report_sudo.report_name}"
report_model = self.env[report_model_name]
res_id = len(docids) == 1 and docids[0]
res_id = docids and len(docids) == 1 and docids[0]
if not res_id or not report_sudo.attachment or not report_sudo.attachment_use:
return report_model.with_context(
**{
Expand Down