Skip to content

[fork-CI] [19.0][MIG] report_qweb_encrypt: Migration to 19.0#2

Draft
dnplkndll wants to merge 40 commits into
19.0from
19.0-mig-report_qweb_encrypt
Draft

[fork-CI] [19.0][MIG] report_qweb_encrypt: Migration to 19.0#2
dnplkndll wants to merge 40 commits into
19.0from
19.0-mig-report_qweb_encrypt

Conversation

@dnplkndll
Copy link
Copy Markdown

Port of report_qweb_encrypt from 18.0 to 19.0. Follows the OCA migration guide.

Non-mechanical adaptations worth flagging

  • PdfFileReader/PdfFileWriter are now imported from odoo.tools.pdf instead of the unmaintained PyPDF2 package. This matches Odoo core and the sibling pdf_xml_attachment module on 19.0, and drops the third-party dependency the module relied on without declaring it. The compat aliases are drop-in, so appendPagesFromReader / encrypt are otherwise unchanged.

etobella and others added 30 commits May 29, 2026 19:01
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.
mymage and others added 10 commits May 29, 2026 19:01
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.