mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-19 05:12:02 +02:00
Add cloneReaderDocumentRoot compatibility method
Fix additional PyPDF2 3.0+ deprecation error for cloneReaderDocumentRoot
method which was replaced with clone_reader_document_root.
Changes:
- Add cloneReaderDocumentRoot compatibility method to PdfFileWriter wrapper
- Update documentation to include the new method mapping
- Resolves account_edi PDF generation error
Resolves PyPDF2.errors.DeprecationError: cloneReaderDocumentRoot is deprecated
and was removed in PyPDF2 3.0.0. Use clone_reader_document_root instead.
🤖 assisted by claude
This commit is contained in:
parent
33b8eb73c9
commit
c3d53c6a4d
2 changed files with 6 additions and 0 deletions
|
|
@ -46,6 +46,10 @@ try:
|
|||
def addMetadata(self, metadata):
|
||||
"""Compatibility method for old API"""
|
||||
return self.add_metadata(metadata)
|
||||
|
||||
def cloneReaderDocumentRoot(self, reader):
|
||||
"""Compatibility method for old API"""
|
||||
return self.clone_reader_document_root(reader)
|
||||
|
||||
PyPDF2.PdfFileReader = PdfFileReader
|
||||
PyPDF2.PdfFileWriter = PdfFileWriter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue