server-tools icon indicating copy to clipboard operation
server-tools copied to clipboard

[14.0] excel_import_export - Having multiple cells with the same value makes the exported file have a duplicated amount of rows

Open NathanQj opened this issue 1 year ago • 0 comments

Module

excel_import_export

Describe the bug

When creating an Export model with "Easy Reporting", if multiple Cells in the export mapping share the same value, then the generated Excel file will have duplicated rows (multiplication factor being the number of time a value is repeated in the mapping).

For example : If I have an Easy Report for product.template with 9 records and the following mapping: A1 -> default_code -> ${value or ""} B1 -> default_code -> ${value or ""} C1 -> default_code -> ${value or ""} D1 -> name -> ${value or ""}

Then the generated file will have: 27 rows with A, B and C filled with the value of default_code 9 rows with D correctly filled with the value of name

To Reproduce

14.0:

Steps to reproduce the behavior:

  1. Create a new XLSX Template
  2. Check "Easy Reporting"
  3. Add a Report Model (e.g "product.template")
  4. Fill the Export tab (export_ids field) with the example given above (X columns with the same value, X greater than 1)

Expected behavior The number of rows should remain consistent with the number of records exported. Capture d'écran 2024-09-30 164306 Capture d'écran 2024-09-30 164110

NathanQj avatar Sep 30 '24 14:09 NathanQj