From 23e6fa7427e3b36c8009febbc785369d9f7ff6cb Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 17 Apr 2013 09:32:49 +0200 Subject: [PATCH] Add encoding in the shell script get_cid_name_timeout.sh Remove an unused line of code. Move a line of code at the right place ! --- asterisk_click2dial/asterisk_click2dial.py | 2 +- asterisk_click2dial/scripts/get_cid_name_timeout.sh | 2 ++ asterisk_click2dial_crm/wizard/create_crm_phonecall.py | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/asterisk_click2dial/asterisk_click2dial.py b/asterisk_click2dial/asterisk_click2dial.py index 292446c..cacd133 100644 --- a/asterisk_click2dial/asterisk_click2dial.py +++ b/asterisk_click2dial/asterisk_click2dial.py @@ -475,8 +475,8 @@ class res_partner_address(osv.osv): if not isinstance(number, (str, unicode)): _logger.warning(u"Number should be a 'str' or 'unicode' but it is a '%s'" % type(number)) return False - _logger.warning(u"Number should only contain digits.") if not number.isdigit(): + _logger.warning(u"Number should only contain digits.") return False # We try to match a phone or mobile number with the same end diff --git a/asterisk_click2dial/scripts/get_cid_name_timeout.sh b/asterisk_click2dial/scripts/get_cid_name_timeout.sh index 191cf82..6b79e7d 100755 --- a/asterisk_click2dial/scripts/get_cid_name_timeout.sh +++ b/asterisk_click2dial/scripts/get_cid_name_timeout.sh @@ -1,4 +1,6 @@ #! /bin/sh +# -*- encoding: utf-8 -*- +# # Written by Alexis de Lattre # Example of wrapper for get_cid_name.py which makes sure that the diff --git a/asterisk_click2dial_crm/wizard/create_crm_phonecall.py b/asterisk_click2dial_crm/wizard/create_crm_phonecall.py index f919c5c..a29521b 100644 --- a/asterisk_click2dial_crm/wizard/create_crm_phonecall.py +++ b/asterisk_click2dial_crm/wizard/create_crm_phonecall.py @@ -37,8 +37,6 @@ class wizard_create_crm_phonecall(osv.osv_memory): def _create_open_crm_phonecall(self, cr, uid, partner_address, crm_categ, context=None): if context is None: context = {} - crm_phonecall_obj = self.pool.get('crm.phonecall') - categ_ids = self.pool.get('crm.case.categ').search(cr, uid, [('name','=',crm_categ)], context={'lang': 'en_US'}) case_section_ids = self.pool.get('crm.case.section').search(cr, uid, [('member_ids', 'in', uid)], context=context) context.update({