Allow to execute reports without records

issue10409
review355391002
This commit is contained in:
Cédric Krier committed 2021-09-02 23:19:36 +02:00
1 parent 6920de2b55
commit c2e2cdb148
1 file changed
+4 -1
+4 -1
View File
@@ -178,7 +178,10 @@ class Report(URLMixin, PoolBase):
if model:
records = cls._get_records(ids, model, data)
if action_report.single:
if not records:
groups = [[]]
headers = [{}]
elif action_report.single:
groups = [[r] for r in records]
headers = [dict(cls.header_key(r)) for r in records]
else: