Browse Source

Merge pull request #235 from acsone/9.0-mis_builder-fix204-sbi

[FIX] mis_builder: crash in xslx with one column
pull/237/head
Pedro M. Baeza 8 years ago
committed by GitHub
parent
commit
9953b55687
  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