diff --git a/crm_phone/__manifest__.py b/crm_phone/__manifest__.py index a0e9bdc..65a6053 100644 --- a/crm_phone/__manifest__.py +++ b/crm_phone/__manifest__.py @@ -24,6 +24,7 @@ for any help or question about this module. 'author': "Akretion,Odoo Community Association (OCA)", 'website': 'http://www.akretion.com/', 'depends': ['base_phone', 'crm'], + 'external_dependencies': {'python': ['phonenumbers']}, 'conflicts': ['crm_voip'], 'data': [ 'security/phonecall_security.xml', diff --git a/crm_phone/wizard/create_crm_phonecall.py b/crm_phone/wizard/create_crm_phonecall.py index 98569da..7b6e912 100644 --- a/crm_phone/wizard/create_crm_phonecall.py +++ b/crm_phone/wizard/create_crm_phonecall.py @@ -3,7 +3,13 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, api, _ -import phonenumbers +import logging +logger = logging.getLogger(__name__) + +try: + import phonenumbers +except ImportError: + logger.debug('Cannot import phonenumbers lib.') class WizardCreateCrmPhonecall(models.TransientModel):