From a91924f7125888a334c00dce4d9616f5621579e2 Mon Sep 17 00:00:00 2001 From: Ernad Husremovic Date: Mon, 9 Mar 2026 16:12:07 +0100 Subject: [PATCH] fix PyPDF2 3.x compat: add cloneReaderDocumentRoot shim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PyPDF2 3.0 removed the camelCase cloneReaderDocumentRoot method. Add a shim that delegates to clone_reader_document_root. 🤖 assisted by claude --- odoo-bringout-oca-ocb-base/odoo/tools/pdf/_pypdf2_2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/odoo-bringout-oca-ocb-base/odoo/tools/pdf/_pypdf2_2.py b/odoo-bringout-oca-ocb-base/odoo/tools/pdf/_pypdf2_2.py index 8fcb2770..7fc1bcb0 100644 --- a/odoo-bringout-oca-ocb-base/odoo/tools/pdf/_pypdf2_2.py +++ b/odoo-bringout-oca-ocb-base/odoo/tools/pdf/_pypdf2_2.py @@ -17,3 +17,7 @@ class PdfWriter(_Writer): def _addObject(self, *args, **kwargs): return self._add_object(*args, **kwargs) + + def cloneReaderDocumentRoot(self, reader): + # PyPDF2 3.0 renamed camelCase to snake_case and removed the old names + return self.clone_reader_document_root(reader)