Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] report_csv: make it working if docids is False #962

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
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 = "report.%s" % report_sudo.report_name
report_model = self.env[report_model_name]
res_id = len(docids) == 1 and docids[0]
res_id = (len(docids) == 1 and docids[0]) if docids else False
if not res_id or not report_sudo.attachment or not report_sudo.attachment_use:
return report_model.with_context(
**{
Expand Down
Loading