diff --git a/CHANGELOG b/CHANGELOG index 86ff3ccb14..315d0c22c2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Add record name in report filename * Add deletable and writable state from ir.rule to read * Add language attribute to data tag * Add e-mail template diff --git a/trytond/report/report.py b/trytond/report/report.py index 87242a29fd..35e112b263 100644 --- a/trytond/report/report.py +++ b/trytond/report/report.py @@ -174,7 +174,12 @@ class Report(URLMixin, PoolBase): oext, content = cls._execute(records, data, action_report) if not isinstance(content, str): content = bytearray(content) if bytes == str else bytes(content) - return (oext, content, action_report.direct_print, action_report.name) + + 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) + return (oext, content, action_report.direct_print, report_name) @classmethod def _execute(cls, records, data, action):