Skip to content

Commit

Permalink
Merge pull request #5 from versada/fix-pypdf-ala
Browse files Browse the repository at this point in the history
[FIX] report_py3o: adapt for python > 3.10
  • Loading branch information
oerp-odoo authored Jul 12, 2024
2 parents 9906460 + a110928 commit 55a7aea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion report_py3o/tests/test_report_py3o.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@

import pkg_resources
from PyPDF2 import PdfFileWriter
from PyPDF2.pdf import PageObject

try:
from PyPDF2.pdf import PageObject
# If python > 3.10, odoo installs PyPDF2==2.12.1 and it no longer has
# PyPDF2.pdf module.
except ModuleNotFoundError:
from PyPDF2 import PageObject

from odoo import tools
from odoo.exceptions import ValidationError
Expand Down

0 comments on commit 55a7aea

Please sign in to comment.