diff --git a/account_financial_report_qweb/README.rst b/account_financial_report_qweb/README.rst index 4420f64843d..69091e9dc62 100644 --- a/account_financial_report_qweb/README.rst +++ b/account_financial_report_qweb/README.rst @@ -51,6 +51,7 @@ Contributors * Lorenzo Battistini * Julien Coux * Akim Juillerat +* Jairo Llopis Much of the work in this module was done at a sprint in Sorrento, Italy in April 2016. diff --git a/account_financial_report_qweb/__manifest__.py b/account_financial_report_qweb/__manifest__.py index 3101fcb5139..a88884829ac 100644 --- a/account_financial_report_qweb/__manifest__.py +++ b/account_financial_report_qweb/__manifest__.py @@ -34,8 +34,11 @@ 'report/templates/trial_balance.xml', 'view/account_view.xml' ], - 'test': [ - ], + 'external_dependencies': { + "python": [ + "xlsxwriter", + ], + }, 'installable': True, 'application': True, 'auto_install': False, diff --git a/account_financial_report_qweb/report/abstract_report_xlsx.py b/account_financial_report_qweb/report/abstract_report_xlsx.py index 24d5e5bcd86..360a4a4144a 100644 --- a/account_financial_report_qweb/report/abstract_report_xlsx.py +++ b/account_financial_report_qweb/report/abstract_report_xlsx.py @@ -2,9 +2,15 @@ # Author: Julien Coux # Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +try: + import xlsxwriter +except ImportError: # pragma: no cover + import logging + _logger = logging.getLogger(__name__) + _logger.info("Missing dependency: xlsxwriter.") + _logger.debug("ImportError details:", exc_info=True) from cStringIO import StringIO -import xlsxwriter from odoo.addons.report_xlsx.report.report_xlsx import ReportXlsx