[Erp5-report] r28218 - /erp5/trunk/products/ERP5SyncML/Conduit/

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jul 30 14:17:23 CEST 2009


Author: daniele
Date: Thu Jul 30 14:17:20 2009
New Revision: 28218

URL: http://svn.erp5.org?rev=28218&view=rev
Log:
Change the call of getGidFromXML method and use 

Modified:
    erp5/trunk/products/ERP5SyncML/Conduit/ERP5ConduitTitleGid.py
    erp5/trunk/products/ERP5SyncML/Conduit/SharedVCardConduit.py

Modified: erp5/trunk/products/ERP5SyncML/Conduit/ERP5ConduitTitleGid.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Conduit/ERP5ConduitTitleGid.py?rev=28218&r1=28217&r2=28218&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/ERP5ConduitTitleGid.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/ERP5ConduitTitleGid.py [utf8] Thu Jul 30 14:17:20 2009
@@ -49,9 +49,15 @@
     """
     return object.getTitle()
 
-#  def getGidFromXML(self, xml):
-#    """
-#    return the Gid composed of FirstName and LastName generate with a peace of
-#    xml
-#    """
-#    #to be defined
+  def getGidFromXML(self, xml, namespace, gid_from_xml_list):
+    """
+    return the Gid composed of FirstName and LastName generate with a peace of
+    xml
+    """
+    first_name = xml.xpath('string(.//syncml:object//syncml:first_name)')
+    last_name = xml.xpath('string(.//syncml:object//syncml:last_name)')
+    gid = "%s %s" % (first_name, last_name)
+    if gid in gid_from_xml_list or gid == ' ':
+      return False
+    return gid
+

Modified: erp5/trunk/products/ERP5SyncML/Conduit/SharedVCardConduit.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Conduit/SharedVCardConduit.py?rev=28218&r1=28217&r2=28218&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/SharedVCardConduit.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/SharedVCardConduit.py [utf8] Thu Jul 30 14:17:20 2009
@@ -70,7 +70,7 @@
     LOG('getGidFromObject gid :', DEBUG, gid)
     return gid
 
-  def getGidFromXML(self, vcard, gid_from_xml_list):
+  def getGidFromXML(self, vcard, namespace, gid_from_xml_list):
     """
     return the Gid composed of FirstName and LastName generate with a vcard
     """




More information about the Erp5-report mailing list