Repository navigation
[19.0] *: forward ports from 18.0 - #1225
Open
MiquelRForgeFlow wants to merge 5 commits into
Open
MiquelRForgeFlow wants to merge 5 commits into
MiquelRForgeFlow wants to merge 5 commits into
Conversation
…oes not update the file name when printing file
…encode_error_handling
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.
|
The following commit authors need to sign the Contributor License Agreement: |
Contributor
Author
|
@DucTruongKomit @vincent-hatakeyama could you sign your CLA? :) |
|
My company already signed an ECLA ages ago. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forward ports of: