[Erp5-report] r36875 nicolas - in /erp5/trunk/products/ERP5SyncML: ./ Conduit/

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jul 5 18:32:24 CEST 2010


Author: nicolas
Date: Mon Jul  5 18:32:22 2010
New Revision: 36875

URL: http://svn.erp5.org?rev=36875&view=rev
Log:
Add support of boolean type casting.

Modified:
    erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py
    erp5/trunk/products/ERP5SyncML/SyncCode.py

Modified: erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py?rev=36875&r1=36874&r2=36875&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py [utf8] Mon Jul  5 18:32:22 2010
@@ -822,6 +822,13 @@ class ERP5Conduit(XMLSyncUtilsMixin):
       data = DateTime(data)
     elif data_type in self.int_type_list:
       data = int(data)
+    elif data_type == self.boolean_type:
+      if data == 'False':
+        data = False
+      elif data == 'True':
+        data = True
+      else:
+        raise NotImplementedError
     return data
 
 

Modified: erp5/trunk/products/ERP5SyncML/SyncCode.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/SyncCode.py?rev=36875&r1=36874&r2=36875&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/SyncCode.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/SyncCode.py [utf8] Mon Jul  5 18:32:22 2010
@@ -92,6 +92,7 @@ class SyncCode(Persistent):
   text_type_list = ('text','string')
   list_type_list = list_types
   none_type = 'None'
+  boolean_type = 'boolean'
   force_conflict_list = ('layout_and_schema','ModificationDate')
   binary_type_list = ('image','file','document','pickle')
   date_type_list = ('date',)




More information about the Erp5-report mailing list