Browse Source

try/except on import phonenumbers lib

pull/109/head
Alexis de Lattre 8 years ago
parent
commit
9c86c33ad0
  1. 1
      crm_phone/__manifest__.py
  2. 8
      crm_phone/wizard/create_crm_phonecall.py

1
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',

8
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):

Loading…
Cancel
Save