Browse Source

[FIX] mis_builder: crash in xslx with one column

fixes #204
pull/235/head
Stéphane Bidoul (ACSONE) 8 years ago
parent
commit
3aa468bc7a
  1. 6
      mis_builder/report/mis_report_instance_xlsx.py

6
mis_builder/report/mis_report_instance_xlsx.py

@ -131,9 +131,9 @@ class MisBuilderXlsx(ReportXlsx):
# adjust col widths
sheet.set_column(0, 0, min(label_col_width, MAX_COL_WIDTH) * COL_WIDTH)
data_col_width = min(MAX_COL_WIDTH, max(*col_width.values()))
min_col_pos = min(*col_width.keys())
max_col_pos = max(*col_width.keys())
data_col_width = min(MAX_COL_WIDTH, max(col_width.values()))
min_col_pos = min(col_width.keys())
max_col_pos = max(col_width.keys())
sheet.set_column(min_col_pos, max_col_pos, data_col_width * COL_WIDTH)

Loading…
Cancel
Save