Allow to execute reports without records

issue10409
review355391002
(grafted from df00526a82b28df676073255295a5cdfee060bc5)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2021-09-02 23:19:36 +02:00
1 parent 0af82fc0cb
commit 3f082a04af
1 file changed
+4 -1
+4 -1
View File
@@ -163,7 +163,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: