diff --git a/asterisk_click2dial/scripts/set_name_agi.py b/asterisk_click2dial/scripts/set_name_agi.py
index 29983de..3795169 100755
--- a/asterisk_click2dial/scripts/set_name_agi.py
+++ b/asterisk_click2dial/scripts/set_name_agi.py
@@ -103,8 +103,9 @@ from optparse import OptionParser
# Name that will be displayed if there is no match
-# and no geolocalisation
-not_found_name = "Not in OpenERP"
+# and no geolocalisation. Set it to False if you don't want
+# to have a 'not_found_name' when nothing is found
+not_found_name = "Not in Odoo"
# Define command line options
options = [
@@ -353,10 +354,11 @@ def main(options, arguments):
res = convert_to_ascii(res)
stdout_write('VERBOSE "Name = %s"\n' % res)
- if options.outgoing:
- stdout_write('SET VARIABLE connectedlinename "%s"\n' % res)
- else:
- stdout_write('SET CALLERID "%s"<%s>\n' % (res, phone_number))
+ if res:
+ if options.outgoing:
+ stdout_write('SET VARIABLE connectedlinename "%s"\n' % res)
+ else:
+ stdout_write('SET CALLERID "%s"<%s>\n' % (res, phone_number))
return True
if __name__ == '__main__':
diff --git a/base_phone/res_partner_view.xml b/base_phone/res_partner_view.xml
index f0a66f6..fdc1996 100644
--- a/base_phone/res_partner_view.xml
+++ b/base_phone/res_partner_view.xml
@@ -45,6 +45,16 @@
+
+ base_phone.phone.widget.partner.tree
+ res.partner
+
+
+
+ phone
+
+
+
diff --git a/base_phone/static/src/js/phone_widget.js b/base_phone/static/src/js/phone_widget.js
index 839fe40..4f18554 100644
--- a/base_phone/static/src/js/phone_widget.js
+++ b/base_phone/static/src/js/phone_widget.js
@@ -102,4 +102,15 @@ openerp.base_phone = function (instance) {
instance.web.form.widgets.add('fax', 'instance.base_phone.FieldFax');
+ /* ability to add widget="phone" in TREE view */
+ var _super_list_char_format_ = instance.web.list.Char.prototype._format;
+ instance.web.list.Char.prototype._format = function(row_data, options) {
+ res = _super_list_char_format_.call(this, row_data, options);
+ var value = row_data[this.id].value;
+ if (value && this.widget === 'phone') {
+ return formatInternational('', value);
+ }
+ return res;
+ };
+
}
diff --git a/crm_phone/crm_view.xml b/crm_phone/crm_view.xml
index c3e8696..e4846e4 100644
--- a/crm_phone/crm_view.xml
+++ b/crm_phone/crm_view.xml
@@ -24,6 +24,17 @@
+
+ crm_phone.crm_lead.tree
+ crm.lead
+
+
+
+ phone
+
+
+
+
crm_phone.case.view_opportuniy.form
crm.lead
@@ -55,5 +66,16 @@
+
+ crm_phone.crm_phonecall.tree
+ crm.phonecall
+
+
+
+ phone
+
+
+
+
diff --git a/event_phone/event_view.xml b/event_phone/event_view.xml
index ecf43b0..00fa86c 100644
--- a/event_phone/event_view.xml
+++ b/event_phone/event_view.xml
@@ -26,6 +26,9 @@
phone
+
+ phone
+
diff --git a/hr_phone/hr_view.xml b/hr_phone/hr_view.xml
index 3f7c7a7..b1bed5a 100644
--- a/hr_phone/hr_view.xml
+++ b/hr_phone/hr_view.xml
@@ -21,5 +21,27 @@
+
+ hr_phone.hr_employee.tree
+ hr.employee
+
+
+
+ phone
+
+
+
+
+
+ hr_phone.hr.employee.tree2
+ hr.employee
+
+
+
+ phone
+
+
+
+
diff --git a/hr_recruitment_phone/hr_recruitment_view.xml b/hr_recruitment_phone/hr_recruitment_view.xml
index e8a47b3..16e3817 100644
--- a/hr_recruitment_phone/hr_recruitment_view.xml
+++ b/hr_recruitment_phone/hr_recruitment_view.xml
@@ -21,5 +21,16 @@
+
+ hr_recruitment_phone.hr_applicant.tree
+ hr.applicant
+
+
+
+ phone
+
+
+
+