[16.0][REF] report_qweb_signer: make signing functions reusable - #988
Conversation
|
|
||
| def _render_qweb_pdf(self, report_ref, res_ids=None, data=None): | ||
| report = self._get_report(report_ref) | ||
| certificate = self._certificate_get(report, res_ids) |
There was a problem hiding this comment.
I think this should go in the method _sign_pdf_and_attach, don't you think?
There was a problem hiding this comment.
Hi @pedrobaeza :-)
You really need to methods, one that goes before the super, and one that goes after.
Since the super is not the same if you're operating on another report type, that wouldn't work. (I'm not 100% sure I interpreted your remark in the correct way, let me know if I'm wrong)
pedrobaeza
left a comment
There was a problem hiding this comment.
OK, I see the certificate is also used in the method before the super. Forget it.
|
/ocabot merge patch |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at f35b796. Thanks a lot for contributing to OCA. ❤️ |
This is a simple refactoring to make it easy to reuse the signing code.
Without this,
report_py3o_signerwould have to duplicate a lot of code.See: #987