Skip to content

[19.0] *: forward ports from 18.0 - #1225

Open
MiquelRForgeFlow wants to merge 5 commits into
OCA:19.0from
ForgeFlow:19.0-port-from-18.0
Open

MiquelRForgeFlow wants to merge 5 commits into
OCA:19.0from
ForgeFlow:19.0-port-from-18.0

Conversation

DucTruongKomit and others added 5 commits October 29, 2026 12:45
…oes not update the file name when printing file
LibreOffice can exit with a zero status while producing no output file
(e.g. when the rendered ODT contains content it cannot handle). The
previous code blindly opened the expected output path, so the failure
surfaced as an unhandled FileNotFoundError far from its root cause.

Convert subprocess.check_output failures into a UserError with an
actionable message, capture LO stdout+stderr for the logs, and verify
the output file exists before using it. Log the error before raising
when the conversion command itself cannot be executed.

Controller: add logger.exception() before serializing the error to
JSON, so the real traceback appears in the Odoo logs instead of being
silently swallowed by the except Exception clause. Log the request URL
rather than reportname, which may be unbound if the URL cannot be
parsed.

Tests: cover the zero-exit-no-output branch, the failing conversion
command and the controller logging path; update the availability test
to expect UserError.

Also switch the strings touched here to the Odoo 18 self.env._() API
and drop the now-unused module-level `_` imports.

Backward compatibility note: _convert_single_report_cmd now raises
UserError instead of RuntimeError when the LibreOffice runtime is not
available, which is a behavior change on a stable branch. Overrides
catching RuntimeError must be updated.

Follows OCA patterns from report_csv, report_xlsx, report_xml
controllers for consistent error logging across the reporting-engine
ecosystem.
@oca-cla-bot

oca-cla-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@OCA-git-bot OCA-git-bot added series:19.0 mod:report_csv Module report_csv mod:report_py3o Module report_py3o mod:report_xlsx Module report_xlsx labels Oct 29, 2026
@MiquelRForgeFlow

Copy link
Copy Markdown
Contributor Author

@DucTruongKomit @vincent-hatakeyama could you sign your CLA? :)

@vincent-hatakeyama

Copy link
Copy Markdown

My company already signed an ECLA ages ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:report_csv Module report_csv mod:report_py3o Module report_py3o mod:report_xlsx Module report_xlsx series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants