From 922c7c722dcf8132c7d6f7f262a1ad9869d073d3 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Fri, 24 Jul 2020 16:14:50 +0000 Subject: [PATCH] [FIX] web: show digital signature in PDF Show digital signatures items in PDF.JS preview even if the signature verification is not implemented. From discussion in mozilla/pdf.js this is like this because they don't want to give the user a false sense of "the digital signature has been verified" when it has not, but for a preview of the PDF this seems misleading, in any case the user can have a full fledged PDF reader and know if the document is well signed then. https://github.com/mozilla/pdf.js/ issues/4743 opw-2287840 closes #54922 closes odoo/odoo#54988 X-original-commit: 820128385c523f562b9ee82698c81daa63149bb7 Signed-off-by: Nicolas Lempereur (nle) --- addons/web/static/lib/pdfjs/build/pdf.worker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/web/static/lib/pdfjs/build/pdf.worker.js b/addons/web/static/lib/pdfjs/build/pdf.worker.js index 211fbbdc4cb..a634f2af15f 100644 --- a/addons/web/static/lib/pdfjs/build/pdf.worker.js +++ b/addons/web/static/lib/pdfjs/build/pdf.worker.js @@ -28993,9 +28993,10 @@ function (_Annotation2) { data.readOnly = _this3.hasFieldFlag(_util.AnnotationFieldFlag.READONLY); if (data.fieldType === 'Sig') { - data.fieldValue = null; + // Odoo: display digital signature even if verification not implemented https://github.com/mozilla/pdf.js/issues/4743 + //data.fieldValue = null; - _this3.setFlags(_util.AnnotationFlag.HIDDEN); + //_this3.setFlags(_util.AnnotationFlag.HIDDEN); } return _this3;