Cross-reference of odoo#281660 — the affected files are identical in OCB 19.0 (and 17.0/18.0).
Summary: setup.py declares an unpinned PyPDF2 while requirements.txt pins PyPDF==5.4.0 (modern pypdf) for python_version >= '3.13'. A pip/uv install of the OCB package on Python 3.13 therefore gets both pypdf 5.4.0 and legacy PyPDF2 3.0.1. odoo/tools/pdf/_pypdf2_2.py imports PyPDF2 with no version guard, so the legacy 3.x package wins the backend probe — and its removed camelCase API makes reader.numPages in ir_actions_report._render_qweb_pdf_prepare_streams raise PyPDF2.errors.DeprecationError whenever a qweb-pdf report is printed for more than one record. Single-record printing works, which hides the problem.
Suggested fixes (details and full traceback in the odoo/odoo issue):
- Version-guard
_pypdf2_2.py (raise ImportError for PyPDF2 >= 3) so probing falls through to pypdf.
- Align
setup.py's PyPDF2 requirement with requirements.txt.
Hit in production via OpenSPP's OCB 19.0 Docker image (python:3.13-slim); downstream workaround: OpenSPP/OpenSPP2#407 (install the odoo package with --no-deps, relying on requirements.txt for dependencies).
Cross-reference of odoo#281660 — the affected files are identical in OCB 19.0 (and 17.0/18.0).
Summary:
setup.pydeclares an unpinnedPyPDF2whilerequirements.txtpinsPyPDF==5.4.0(modern pypdf) forpython_version >= '3.13'. A pip/uv install of the OCB package on Python 3.13 therefore gets both pypdf 5.4.0 and legacy PyPDF2 3.0.1.odoo/tools/pdf/_pypdf2_2.pyimportsPyPDF2with no version guard, so the legacy 3.x package wins the backend probe — and its removed camelCase API makesreader.numPagesinir_actions_report._render_qweb_pdf_prepare_streamsraisePyPDF2.errors.DeprecationErrorwhenever a qweb-pdf report is printed for more than one record. Single-record printing works, which hides the problem.Suggested fixes (details and full traceback in the odoo/odoo issue):
_pypdf2_2.py(raiseImportErrorfor PyPDF2 >= 3) so probing falls through to pypdf.setup.py's PyPDF2 requirement withrequirements.txt.Hit in production via OpenSPP's OCB 19.0 Docker image (
python:3.13-slim); downstream workaround: OpenSPP/OpenSPP2#407 (install the odoo package with--no-deps, relying on requirements.txt for dependencies).