diff --git a/excel_import_export/models/xlsx_export.py b/excel_import_export/models/xlsx_export.py index 95749b869..fcc2512a5 100644 --- a/excel_import_export/models/xlsx_export.py +++ b/excel_import_export/models/xlsx_export.py @@ -200,9 +200,7 @@ class XLSXExport(models.AbstractModel): # Insert rows to preserve total line if not rows_inserted: rows_inserted = True - if row_count > 1: - for _x in range(row_count-1): - st.insert_rows(row+1) + st.insert_rows(row+1, amount=row_count-1) # -- for (row_val, style) in vals[field]: new_row = row + i diff --git a/excel_import_export/readme/HISTORY.rst b/excel_import_export/readme/HISTORY.rst index 58745034f..c6e2a27cf 100644 --- a/excel_import_export/readme/HISTORY.rst +++ b/excel_import_export/readme/HISTORY.rst @@ -1,3 +1,8 @@ +12.0.1.0.5 (2019-12-19) +~~~~~~~~~~~~~~~~~~~~~~~ + +* Speed up export when dealing with many rows + 12.0.1.0.4 (2019-08-28) ~~~~~~~~~~~~~~~~~~~~~~~