Remove trailing dash on report name without record name

issue9509
This commit is contained in:
Cédric Krier
2020-09-24 18:38:41 +02:00
parent ce88a10900
commit cf60e3fa6e
+1 -1
View File
@@ -178,7 +178,7 @@ class Report(URLMixin, PoolBase):
suffix = '-'.join(r.rec_name for r in records[:5])
if len(records) > 5:
suffix += '__' + str(len(records[5:]))
report_name = '%s-%s' % (action_report.name, suffix)
report_name = '-'.join(filter(None, [action_report.name, suffix]))
return (oext, content, action_report.direct_print, report_name)
@classmethod