changeset 5c0fae89ab48 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=5c0fae89ab48
description:
        Limit report name to 100 chars

        For most OS maximum filename is 255 but Excel has a limitation which 
include
        the path of 218.
        As on Windows report is most likely to be open from
        C:\Users\<username>\AppData\Local\Temp\tryton_<random>\ which has a 
length of
        56 with 12 for username and 8 for random. So 162 should be the maximum 
but we
        round it to 100.

        issue10966
        review421871004
diffstat:

 trytond/report/report.py |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r dccf58f854e4 -r 5c0fae89ab48 trytond/report/report.py
--- a/trytond/report/report.py  Sun Oct 23 18:52:46 2022 +0200
+++ b/trytond/report/report.py  Wed Oct 26 23:26:14 2022 +0200
@@ -92,7 +92,13 @@
 TIMEDELTA_DEFAULT_CONVERTER['M'] = TIMEDELTA_DEFAULT_CONVERTER['d'] * 30
 TIMEDELTA_DEFAULT_CONVERTER['Y'] = TIMEDELTA_DEFAULT_CONVERTER['d'] * 365
 
-REPORT_NAME_MAX_LENGTH = 200
+# For most OS maximum filename is 255 but Excel has a limitation which include
+# the path of 218.
+# As on Windows report is most likely to be open from
+# C:\Users\<username>\AppData\Local\Temp\tryton_<random>\ which has a length of
+# 56 with 12 for username and 8 for random. So 162 should be the maximum but we
+# round it to 100.
+REPORT_NAME_MAX_LENGTH = 100
 
 
 class TranslateFactory:

Reply via email to