We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a388f6 commit 6a52290Copy full SHA for 6a52290
report_csv/models/ir_report.py
@@ -55,7 +55,7 @@ def _render_csv(self, report_ref, docids, data):
55
report_sudo = self._get_report(report_ref)
56
report_model_name = "report.%s" % report_sudo.report_name
57
report_model = self.env[report_model_name]
58
- res_id = len(docids) == 1 and docids[0]
+ res_id = (len(docids) == 1 and docids[0]) if docids else False
59
if not res_id or not report_sudo.attachment or not report_sudo.attachment_use:
60
return report_model.with_context(
61
**{
0 commit comments