diff --git a/account_asset_management_xls/report/__init__.py b/account_asset_management_xls/report/__init__.py index 486ad18f4..f82441b0c 100644 --- a/account_asset_management_xls/report/__init__.py +++ b/account_asset_management_xls/report/__init__.py @@ -1,2 +1,13 @@ -# -*- coding: utf-8 -*- -from . import account_asset_report_xls + +# The whole python file is ignored when the dependency is missing +# because it contains an old-style rml_parse report which would +# be loaded anyway +try: + from odoo.addons.report_xlsx_helper.report.abstract_report_xlsx \ + import AbstractReportXlsx +except (ImportError, IOError) as err: + import logging + _logger = logging.getLogger(__name__) + _logger.debug(err) +else: + from . import account_asset_report_xls diff --git a/account_move_batch_validate/__init__.py b/account_move_batch_validate/__init__.py index 85bba0cb6..889833d5c 100644 --- a/account_move_batch_validate/__init__.py +++ b/account_move_batch_validate/__init__.py @@ -1,6 +1,13 @@ # -*- coding: utf-8 -*- # Copyright 2014 Camptocamp SA, 2017 ACSONE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from . import models -from . import wizard +try: + from odoo.addons.queue_job.job \ + import job, Job +except (ImportError, IOError) as err: + import logging + _logger = logging.getLogger(__name__) + _logger.debug(err) +else: + from . import models + from . import wizard