[FIX] Don't break installations that don't have report_xlsx installed

Fixes 287
pull/367/head
Stefan Rijnhart 2017-03-21 10:53:14 +01:00 committed by Jordi Ballester
parent dca041afcd
commit adc81d9859
1 changed files with 12 additions and 1 deletions

View File

@ -5,4 +5,15 @@
from . import models
from . import wizard
from . import report
# Don't break installations that don't have this module installed
have_report_xlsx = False
try:
from odoo.addons.report_xlsx.report.report_xlsx import ReportXlsx
have_report_xlsx = True
except ImportError:
import logging
logging.getLogger(__name__).warn('Module report_xlsx is not available')
if have_report_xlsx:
from . import report