Wednesday, August 21, 2024
1 change · saas-17.1
Resolved issues and error corrections
The export feature was adjusted so it no longer treats CSV and Excel exports as read-only when they may need to create supporting records. This prevents export errors for users when import-compatible exports are used with database read-replica setups.
Original PR description
Export routes ('/web/export/csv' and '/web/export/xlsx') are marked as read-only, but the _export_rows() can actually create ir_model_data rows in the database. If import-compatible export is enabled and you export a row without an external ID, you will get a traceback if the readonly replica feature is enabled.
The fallback mechanism of the readonly transaction to retry the current request doesn't work because the `except Exception as exc` in export routes changes the exception type (=> traceback).
=> Remove the readonly flag from export routes.