Skip to content

Conversation

@chienandalu
Copy link
Member

@chienandalu chienandalu commented Aug 20, 2025

Refactor to use pyHanko and the new Odoo core certificate.certificate model.

For now, a minimal refactor has been made as PoC to:

  • Use PyHanko as the signer library (more complete, mantained and reliable)
  • Remove all the forme java pdfsigner stuff.
  • Be able to use Odoo core certificates.

Main pain points:

  • cryptography version is fixed in Odoo requirements.txt. This makes very hard for other libraries to work with that version.
  • The approach has been using the pyhanko-cli tool as backend so we can install it in it's own venv (or whatever isolation method is desired).

Next steps:

  • Given the Odoo approach with the certificate.certificate model, this functionality should pivot around it.
  • Local certs shouldn't be in this module, but on an extension to certificate.
  • Signing method should be in an extension to that module as well
  • As said in the roadmap, maybe the place to set the report signing rules should be the reports themselves.

cc @moduon MT-11131

take a look @yajo

@chienandalu chienandalu force-pushed the 18.0-mig-report_qweb_signer branch 2 times, most recently from b8c7738 to f5bc74e Compare August 21, 2025 15:03
etobella and others added 28 commits September 24, 2025 12:40
Currently translated at 100.0% (1 of 1 strings)

Translation: reporting-engine-15.0/reporting-engine-15.0-report_qr
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-report_qr/ca/
Currently translated at 100.0% (1 of 1 strings)

Translation: reporting-engine-16.0/reporting-engine-16.0-report_qr
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qr/it/
etobella and others added 24 commits September 24, 2025 12:40
Add a new 'Allowed reports' field on the certificate. Only reports listed in this field can be signed. No report means all reports are allowed.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: reporting-engine-14.0/reporting-engine-14.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_qweb_signer/
TypeError: 'int' object is not subscriptable
Currently translated at 26.0% (12 of 46 strings)

Translation: reporting-engine-14.0/reporting-engine-14.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_qweb_signer/it/
Currently translated at 63.0% (29 of 46 strings)

Translation: reporting-engine-14.0/reporting-engine-14.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_qweb_signer/sl/
Currently translated at 100.0% (46 of 46 strings)

Translation: reporting-engine-14.0/reporting-engine-14.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_qweb_signer/ca/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: reporting-engine-14.0/reporting-engine-14.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_qweb_signer/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: reporting-engine-14.0/reporting-engine-14.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_qweb_signer/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: reporting-engine-16.0/reporting-engine-16.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_signer/
Currently translated at 100.0% (46 of 46 strings)

Translation: reporting-engine-16.0/reporting-engine-16.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_signer/es/
Currently translated at 100.0% (46 of 46 strings)

Translation: reporting-engine-16.0/reporting-engine-16.0-report_qweb_signer
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_signer/it/
@chienandalu chienandalu force-pushed the 18.0-mig-report_qweb_signer branch 2 times, most recently from 0e8600d to 0b6abad Compare September 25, 2025 16:05
Refactor to use pyHanko and the new Odoo core `certificate.certificate` model.

For now, a minimal refactor has been made as PoC to:

- Use PyHanko as the signer library (more complete, mantained and reliable)
- Remove all the forme java pdfsigner stuff.
- Be able to use Odoo core certificates.

Main pain points:

- `cryptography` version is fixed in Odoo `requirements.txt`. This makes very hard for other libraries to work with that version.
- The approach has been using the `pyhanko-cli` tool as backend so we can install it in it's own `venv` (or whatever isolation method is desired).

MT-11131
@chienandalu chienandalu force-pushed the 18.0-mig-report_qweb_signer branch from 0b6abad to 2575283 Compare September 26, 2025 15:30
@yajo
Copy link
Member

yajo commented Oct 17, 2025

I see conflicts, and a module report_qr in the diff that I'm not sure it belongs to this PR. Could you check that please?

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.