[fork-CI] [19.0][MIG] report_qweb_encrypt: Migration to 19.0#2
Draft
dnplkndll wants to merge 40 commits into
Draft
[fork-CI] [19.0][MIG] report_qweb_encrypt: Migration to 19.0#2dnplkndll wants to merge 40 commits into
dnplkndll wants to merge 40 commits into
Conversation
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: reporting-engine-15.0/reporting-engine-15.0-report_qweb_encrypt Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-report_qweb_encrypt/
Currently translated at 100.0% (11 of 11 strings) Translation: reporting-engine-15.0/reporting-engine-15.0-report_qweb_encrypt Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-report_qweb_encrypt/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: reporting-engine-16.0/reporting-engine-16.0-report_qweb_encrypt Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_encrypt/
…m_name reportname is not only a string but also a model or integer, the method _get_report handles those cases to return the report.
…ead of reportname
Currently translated at 100.0% (11 of 11 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-report_qweb_encrypt Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_encrypt/it/
Changelog:
Controllers:
- Updated `report_download` parameters and reduce nested conditions.
- Decoded URL query parameters safely using
`url_decode(url.split("?", 1)[1])`.
Models:
- Replaced `_()` by `self.env._()`.
- Removed unnecessary intermediate variables.
- Renamed variable `report` to `report_sudo` for clarity on sudoed
record.
Views:
- Replaced `attrs` by individual `invisible` attributes.
Assets:
- Added `EncryptDialog` OWL component to prompt user for encryption
password.
- Implemented `download_function` to handle password injection and PDF
download.
- Refactored report URL building into `buildReportUrl` helper.
- Integrated `EncryptDialog` in `ir.actions.report handlers` registry
under key `qweb-pdf-password`.
- Updated XML template `report_qweb_encrypt.EncryptDialogBody`: added
password input field with `t-ref="password"`, added placeholder for
better UX.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: reporting-engine-18.0/reporting-engine-18.0-report_qweb_encrypt Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_qweb_encrypt/
Currently translated at 100.0% (12 of 12 strings) Translation: reporting-engine-18.0/reporting-engine-18.0-report_qweb_encrypt Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_qweb_encrypt/it/
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
- Import PdfFileReader/PdfFileWriter from odoo.tools.pdf instead of the unmaintained PyPDF2 package — matches Odoo core and the sibling pdf_xml_attachment module, and drops the previously-undeclared third-party dependency. Signed-off-by: Don Kendall <dkendall@ledoweb.com>
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.
Port of
report_qweb_encryptfrom18.0to19.0. Follows the OCA migration guide.Non-mechanical adaptations worth flagging
PdfFileReader/PdfFileWriterare now imported fromodoo.tools.pdfinstead of the unmaintainedPyPDF2package. This matches Odoo core and the siblingpdf_xml_attachmentmodule on 19.0, and drops the third-party dependency the module relied on without declaring it. The compat aliases are drop-in, soappendPagesFromReader/encryptare otherwise unchanged.