diff --git a/addons/account/models/ir_actions_report.py b/addons/account/models/ir_actions_report.py index 78d5ab3616f..19a949b6da8 100644 --- a/addons/account/models/ir_actions_report.py +++ b/addons/account/models/ir_actions_report.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- -import textwrap from collections import OrderedDict -from PyPDF2.utils import PdfStreamError + +try: + from PyPDF2.errors import PdfStreamError +except ImportError: + from PyPDF2.utils import PdfStreamError from odoo import models, _ from odoo.exceptions import UserError