-
- Downloads
[FIX] web: Correctly aggregate values in exported parent groups
When exporting a grouped list view with some nested groups, the aggregate value of parent groups are not correct. It always sums aggregated values of children whether the group operator is 'sum' or not (could be 'max', 'avg', ...). This behavior is wrong and can even lead to a crash if the aggregated field is a date field (e.g. with group_operator='max'). (Try two sum two dates...) The quick fix 85cf47fc was merged just before OXP to avoid any crash. This fix limited the support of aggregates to only int and float fields. This commit remove this limitation. This commit correclty implements the aggregation for parent group for all field types and all group_operator. This commit also improves the export feature tests.
Showing
- addons/test_xlsx_export/__init__.py 1 addition, 0 deletionsaddons/test_xlsx_export/__init__.py
- addons/test_xlsx_export/__manifest__.py 12 additions, 0 deletionsaddons/test_xlsx_export/__manifest__.py
- addons/test_xlsx_export/ir.model.access.csv 3 additions, 0 deletionsaddons/test_xlsx_export/ir.model.access.csv
- addons/test_xlsx_export/models.py 34 additions, 0 deletionsaddons/test_xlsx_export/models.py
- addons/test_xlsx_export/tests/__init__.py 4 additions, 0 deletionsaddons/test_xlsx_export/tests/__init__.py
- addons/test_xlsx_export/tests/test_export.py 341 additions, 0 deletionsaddons/test_xlsx_export/tests/test_export.py
- addons/web/controllers/main.py 91 additions, 13 deletionsaddons/web/controllers/main.py
- addons/web/tests/__init__.py 0 additions, 1 deletionaddons/web/tests/__init__.py
- addons/web/tests/test_export.py 0 additions, 176 deletionsaddons/web/tests/test_export.py
Loading
Please register or sign in to comment