From 02be462695e504b5d218ecf93ff336c4eaf58547 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Mon, 24 Oct 2011 15:33:07 +0200
Subject: [PATCH] make telephone field searchable in person_module view and
 organisation_module view.

---
 ...z_related_child_telephone.catalog_keys.xml |   2 +
 .../z_related_child_telephone.xml             |  43 +++
 .../related_key_list.xml                      |   1 +
 ...rganisationModule_viewOrganisationList.xml |   1 +
 .../listbox.xml                               |   8 +-
 ...listbox_child_telephone_SearchableText.xml | 275 ++++++++++++++++++
 .../erp5_base/PersonModule_viewPersonList.xml |   1 +
 .../PersonModule_viewPersonList/listbox.xml   |  20 +-
 ...listbox_child_telephone_SearchableText.xml | 275 ++++++++++++++++++
 bt5/erp5_base/bt/change_log                   |   3 +
 bt5/erp5_base/bt/revision                     |   2 +-
 .../bt/template_catalog_method_id_list        |   1 +
 .../bt/template_catalog_related_key_list      |   3 +-
 13 files changed, 617 insertions(+), 18 deletions(-)
 create mode 100644 bt5/erp5_base/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_child_telephone.catalog_keys.xml
 create mode 100644 bt5/erp5_base/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_child_telephone.xml
 create mode 100644 bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList/listbox_child_telephone_SearchableText.xml
 create mode 100644 bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList/listbox_child_telephone_SearchableText.xml

diff --git a/bt5/erp5_base/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_child_telephone.catalog_keys.xml b/bt5/erp5_base/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_child_telephone.catalog_keys.xml
new file mode 100644
index 0000000000..a540f9431e
--- /dev/null
+++ b/bt5/erp5_base/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_child_telephone.catalog_keys.xml
@@ -0,0 +1,2 @@
+<catalog_method>
+</catalog_method>
diff --git a/bt5/erp5_base/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_child_telephone.xml b/bt5/erp5_base/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_child_telephone.xml
new file mode 100644
index 0000000000..14438e49d9
--- /dev/null
+++ b/bt5/erp5_base/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_child_telephone.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>arguments_src</string> </key>
+            <value> <string>table_0\r\n
+table_1</string> </value>
+        </item>
+        <item>
+            <key> <string>connection_id</string> </key>
+            <value> <string>erp5_sql_connection</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>z_related_child_telephone</string> </value>
+        </item>
+        <item>
+            <key> <string>src</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<dtml-comment>\n
+table_0 : catalog as child\n
+table_1 : telephone as telephone\n
+</dtml-comment>\n
+catalog.uid = <dtml-var table_0>.parent_uid\n
+AND <dtml-var table_0>.portal_type = \'Telephone\'\n
+AND <dtml-var table_0>.uid =  <dtml-var table_1>.uid
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_base/CatalogRelatedKeyTemplateItem/related_key_list.xml b/bt5/erp5_base/CatalogRelatedKeyTemplateItem/related_key_list.xml
index f1b1bad189..7c7d4f6b06 100644
--- a/bt5/erp5_base/CatalogRelatedKeyTemplateItem/related_key_list.xml
+++ b/bt5/erp5_base/CatalogRelatedKeyTemplateItem/related_key_list.xml
@@ -1,5 +1,6 @@
 <key_list>
  <key>child_address_SearchableText | catalog,full_text/SearchableText/z_related_child_address</key>
+ <key>child_telephone_SearchableText | catalog,full_text/SearchableText/z_related_child_telephone</key>
  <key>default_email_text | catalog,email/url_string/z_related_default_email</key>
  <key>destination_person_title | category,catalog/title/z_related_destination_person</key>
  <key>owner_title | catalog/title/z_related_owner_title</key>
diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList.xml
index aaa468a90b..00d874a91d 100644
--- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList.xml
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList.xml
@@ -71,6 +71,7 @@
                     <value>
                       <list>
                         <string>listbox_child_address_SearchableText</string>
+                        <string>listbox_child_telephone_SearchableText</string>
                       </list>
                     </value>
                 </item>
diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList/listbox.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList/listbox.xml
index 8e16328a12..35c3ba4ed5 100644
--- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList/listbox.xml
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList/listbox.xml
@@ -170,7 +170,7 @@
                           <string>Activity</string>
                         </tuple>
                         <tuple>
-                          <string>default_telephone_text</string>
+                          <string>child_telephone_SearchableText</string>
                           <string>Telephone</string>
                         </tuple>
                         <tuple>
@@ -258,6 +258,10 @@
                           <string>title</string>
                           <string>Name</string>
                         </tuple>
+                        <tuple>
+                          <string>child_telephone_SearchableText</string>
+                          <string>Telephone</string>
+                        </tuple>
                         <tuple>
                           <string>default_email_text</string>
                           <string>Email</string>
@@ -325,7 +329,7 @@
                           <string>Entity_getDefaultEmailAsURL</string>
                         </tuple>
                         <tuple>
-                          <string>default_telephone_text</string>
+                          <string>child_telephone_SearchableText</string>
                           <string>Entity_getDefaultTelephoneAsURL</string>
                         </tuple>
                       </list>
diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList/listbox_child_telephone_SearchableText.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList/listbox_child_telephone_SearchableText.xml
new file mode 100644
index 0000000000..c889a4649c
--- /dev/null
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/OrganisationModule_viewOrganisationList/listbox_child_telephone_SearchableText.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="StringField" module="Products.Formulator.StandardFields"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>listbox_child_telephone_SearchableText</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+                <item>
+                    <key> <string>required_not_found</string> </key>
+                    <value> <string>Input is required but no input given.</string> </value>
+                </item>
+                <item>
+                    <key> <string>too_long</string> </key>
+                    <value> <string>Too much input was given.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>truncate</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>truncate</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <int>20</int> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>listbox_child_address_SearchableText</string> </value>
+                </item>
+                <item>
+                    <key> <string>truncate</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>cell/getDefaultTelephoneText</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList.xml
index 5b727706d2..58ea51fc70 100644
--- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList.xml
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList.xml
@@ -71,6 +71,7 @@
                     <value>
                       <list>
                         <string>listbox_child_address_SearchableText</string>
+                        <string>listbox_child_telephone_SearchableText</string>
                       </list>
                     </value>
                 </item>
diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList/listbox.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList/listbox.xml
index 6ab0b56637..1e3b7a129f 100644
--- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList/listbox.xml
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList/listbox.xml
@@ -183,7 +183,7 @@
                           <string>Role</string>
                         </tuple>
                         <tuple>
-                          <string>default_telephone_text</string>
+                          <string>child_telephone_SearchableText</string>
                           <string>Telephone</string>
                         </tuple>
                         <tuple>
@@ -303,7 +303,7 @@ Role & Region
                           <string>Email</string>
                         </tuple>
                         <tuple>
-                          <string>default_telephone_text</string>
+                          <string>child_telephone_SearchableText</string>
                           <string>Telephone</string>
                         </tuple>
                         <tuple>
@@ -326,10 +326,6 @@ Role & Region
                           <string>translated_validation_state_title</string>
                           <string>State</string>
                         </tuple>
-                        <tuple>
-                          <string>default_telephone_text</string>
-                          <string>Telephone</string>
-                        </tuple>
                         <tuple>
                           <string>default_email_text</string>
                           <string>Email</string>
@@ -389,7 +385,7 @@ Role & Region
                           <string>Email</string>
                         </tuple>
                         <tuple>
-                          <string>default_telephone_text</string>
+                          <string>child_telephone_SearchableText</string>
                           <string>Telephone</string>
                         </tuple>
                         <tuple>
@@ -412,17 +408,13 @@ Role & Region
                           <string>translated_validation_state_title</string>
                           <string>State</string>
                         </tuple>
-                        <tuple>
-                          <string>default_telephone_text</string>
-                          <string>Telephone</string>
-                        </tuple>
                         <tuple>
                           <string>default_email_text</string>
                           <string>Email</string>
                         </tuple>
                         <tuple>
-                          <string>default_address_text</string>
-                          <string>Address</string>
+                          <string>child_address_SearchableText</string>
+                          <string>Address (Full Text)</string>
                         </tuple>
                         <tuple>
                           <string>reference</string>
@@ -452,7 +444,7 @@ Role & Region
                           <string>Entity_getDefaultEmailAsURL</string>
                         </tuple>
                         <tuple>
-                          <string>default_telephone_text</string>
+                          <string>child_telephone_SearchableText</string>
                           <string>Entity_getDefaultTelephoneAsURL</string>
                         </tuple>
                       </list>
diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList/listbox_child_telephone_SearchableText.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList/listbox_child_telephone_SearchableText.xml
new file mode 100644
index 0000000000..c889a4649c
--- /dev/null
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PersonModule_viewPersonList/listbox_child_telephone_SearchableText.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="StringField" module="Products.Formulator.StandardFields"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>listbox_child_telephone_SearchableText</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+                <item>
+                    <key> <string>required_not_found</string> </key>
+                    <value> <string>Input is required but no input given.</string> </value>
+                </item>
+                <item>
+                    <key> <string>too_long</string> </key>
+                    <value> <string>Too much input was given.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>truncate</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>truncate</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <int>20</int> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>listbox_child_address_SearchableText</string> </value>
+                </item>
+                <item>
+                    <key> <string>truncate</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>cell/getDefaultTelephoneText</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_base/bt/change_log b/bt5/erp5_base/bt/change_log
index 9f8b899a0e..20d0975a99 100644
--- a/bt5/erp5_base/bt/change_log
+++ b/bt5/erp5_base/bt/change_log
@@ -1,3 +1,6 @@
+2011-10-24 Kazuhiko
+* make telephone field searchable in person_module view and organisation_module view.
+
 2011-07-01 yusei
 * Set proper title to interaction workflow.
 
diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision
index f03187e185..cf5106d72a 100644
--- a/bt5/erp5_base/bt/revision
+++ b/bt5/erp5_base/bt/revision
@@ -1 +1 @@
-998
\ No newline at end of file
+999
\ No newline at end of file
diff --git a/bt5/erp5_base/bt/template_catalog_method_id_list b/bt5/erp5_base/bt/template_catalog_method_id_list
index 6236b7c94c..97409d59ee 100644
--- a/bt5/erp5_base/bt/template_catalog_method_id_list
+++ b/bt5/erp5_base/bt/template_catalog_method_id_list
@@ -1,4 +1,5 @@
 erp5_mysql_innodb/z_related_child_address
+erp5_mysql_innodb/z_related_child_telephone
 erp5_mysql_innodb/z_related_default_email
 erp5_mysql_innodb/z_related_destination_person
 erp5_mysql_innodb/z_related_owner_title
diff --git a/bt5/erp5_base/bt/template_catalog_related_key_list b/bt5/erp5_base/bt/template_catalog_related_key_list
index b865527c5b..e5085168fa 100644
--- a/bt5/erp5_base/bt/template_catalog_related_key_list
+++ b/bt5/erp5_base/bt/template_catalog_related_key_list
@@ -4,4 +4,5 @@ destination_person_title | category,catalog/title/z_related_destination_person
 default_email_text | catalog,email/url_string/z_related_default_email
 related_resource_use_uid | category,category,catalog,catalog/uid/z_related_resource_use
 owner_title | catalog/title/z_related_owner_title
-child_address_SearchableText | catalog,full_text/SearchableText/z_related_child_address
\ No newline at end of file
+child_address_SearchableText | catalog,full_text/SearchableText/z_related_child_address
+child_telephone_SearchableText | catalog,full_text/SearchableText/z_related_child_telephone
\ No newline at end of file
-- 
2.30.9