generated report filetype default mimetype application/zip and not application/vnd.oasis.opendocument.text
I noticed since the new flat xml ODF report template integration that
leaving the report output format the default, or blank, causes problems
opening the file after generation.
The system zip archive manager gives the following:
Could not open "Trial-Balance.odt"
Archive type not supported.
indeed:
$ file -ik /tmp/tryton_vvtc3Q/Trial-Balance.odt
/tmp/tryton_vvtc3Q/Trial-Balance.odt: application/zip\012- application/octet-stream; charset=binary
$ xdg-open /tmp/tryton_vvtc3Q/Trial-Balance.odt
# gives error indicated above
if I manually do a conversion off the model:
$ soffice --headless --nolockcheck --nodefault --norestore --convert-to odt --outdir /tmp ~/src/hg-tryton/trytond/trytond/modules/account/trial_balance.fodt
$ file -ik /tmp/trial_balance.odt
/tmp/trial_balance.odt: application/vnd.oasis.opendocument.text\012- application/octet-stream; charset=binary
$ xdg-open /tmp/trial_balance.odt
#opens the file just fine
I believe, though not sure, that the following commit may have something to do with the issue:
># HG changeset patch
># User Cédric Krier <ced@b2ck.com>
># Date 1504430050 -7200
># Sun Sep 03 11:14:10 2017 +0200
># Node ID 0bd088a8474b
># Parent ddd3ff6b77b9
>Add support for single record report
>
>A single report render each record separately and return them in a zip file.
>To ensure the uniqueness of the file in the zip, it uses the id of the record
>but also the record name to be user-friendly.
>
>#6640 (closed)
>review37581002
The workaround that works for me is to specifically set an extension
in Administration->User Interface->Actions->Reports for each report