diff --git a/trytond/trytond/report/report.py b/trytond/trytond/report/report.py index 79e783dfed..8795ec2e19 100644 --- a/trytond/trytond/report/report.py +++ b/trytond/trytond/report/report.py @@ -48,10 +48,10 @@ try: except ImportError: qrcode = None -warnings.simplefilter("ignore") -import relatorio.reporting # noqa: E402 +with warnings.catch_warnings(): + warnings.simplefilter("ignore") + import relatorio.reporting # noqa: E402 -warnings.resetwarnings() try: from relatorio.templates.opendocument import MANIFEST, Manifest except ImportError: