Commit graph

7 commits

Author SHA1 Message Date
Ernad Husremovic
81050e9b17 Enhance PyPDF2 3.x compatibility with comprehensive monkey-patching
- Add force-override monkey-patches for deprecated methods (getObject, getData) in both PyPDF2.generic._base and PyPDF2.generic modules
- Create DecodedStreamObject wrapper for setData/getData compatibility
- Add explicit page copying after cloneReaderDocumentRoot in tests to fix empty PDF issue
- Update documentation with monkey-patching approach, troubleshooting guide, and test results
- Apply patches at module level in both pdf.py and ir_actions_report.py
- All PyPDF2 deprecation errors now resolved for PDF generation and attachment workflows

🤖 assisted by claude

🤖 assisted by claude
2025-11-08 13:49:21 +01:00
Ernad Husremovic
715f5d72f9 rename PATCH_PDFWRITER.md to PATCH_PYPDF2_PDFWRITER.md
🤖 assisted by claude
2025-09-02 19:31:24 +02:00
Ernad Husremovic
3f19943cec fix PyPDF2 3.x page copying issue - prevent 327-byte empty PDFs
Added explicit page copying after cloneReaderDocumentRoot() calls because
PyPDF2 3.x only copies document structure, not content pages.

🤖 assisted by claude
2025-09-02 19:31:11 +02:00
Ernad Husremovic
c3d53c6a4d 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
2025-09-02 19:00:48 +02:00
Ernad Husremovic
e8119c9226 Fix PyPDF2 3.0+ compatibility issues
Add compatibility wrapper classes for PdfFileWriter/PdfFileReader
to support both PyPDF2 2.x and 3.x versions.

Changes:
- Add PdfWriter/PdfReader compatibility wrappers in odoo/tools/pdf.py
- Add compatibility classes in odoo/addons/base/models/ir_actions_report.py
- Create comprehensive documentation in doc/PATCH_PDFWRITER.md

Resolves PyPDF2.errors.DeprecationError: PdfFileWriter is deprecated
and was removed in PyPDF2 3.0.0.

🤖 assisted by claude
2025-09-02 18:47:52 +02:00
Ernad Husremovic
5ee733c06c Fix mermaid cycle error: rename CLI node to CLIEP to avoid conflict with subgraph name
The diagram had a cycle where node 'CLI' was inside subgraph 'CLI', creating:
'Setting CLI as parent of CLI would create a cycle'

Fixed by renaming the node to 'CLIEP' (CLI Entrypoints) to avoid the naming conflict.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 16:59:42 +02:00
Ernad Husremovic
12c29a983b Initial commit: Core packages 2025-08-29 15:20:45 +02:00