From 0c17e6ac7ade15375e0140ecdec9c2bf5f76ef27 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Mon, 26 Jan 2004 10:53:38 +0000 Subject: [PATCH] several modification in order to manage the property type object git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@331 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5SyncML/Conduit/ERP5Conduit.py | 7 ++++++- product/ERP5SyncML/SyncCode.py | 2 +- product/ERP5SyncML/SynchronizationTool.py | 8 -------- product/ERP5SyncML/XMLSyncUtils.py | 1 + 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/product/ERP5SyncML/Conduit/ERP5Conduit.py b/product/ERP5SyncML/Conduit/ERP5Conduit.py index 3c8ffbec81..ccc4d9109d 100755 --- a/product/ERP5SyncML/Conduit/ERP5Conduit.py +++ b/product/ERP5SyncML/Conduit/ERP5Conduit.py @@ -357,7 +357,9 @@ class ERP5Conduit(XMLSyncUtilsMixin): if args != {} and (isConflict==0 or force): LOG('updateNode',0,'object._edit, args: %s' % str(args)) object._edit(**args) - #if hasattr(object,'getDocid'): # This is a proxy, CPS + # It is sometimes required to do something after an edit + if hasattr(object,'manage_afterEdit'): + object.manage_afterEdit() if keyword == 'object': # This is the case where we have to call addNode @@ -730,6 +732,9 @@ class ERP5Conduit(XMLSyncUtilsMixin): # edit the object with a dictionnary of arguments, # like {"telephone_number":"02-5648"} object._edit(**args) + if hasattr(object,'manage_afterEdit'): + object.manage_afterEdit() + # Then we may create subobject for subnode in self.getElementNodeList(xml): diff --git a/product/ERP5SyncML/SyncCode.py b/product/ERP5SyncML/SyncCode.py index 7602dbea7d..3aac49f115 100755 --- a/product/ERP5SyncML/SyncCode.py +++ b/product/ERP5SyncML/SyncCode.py @@ -86,7 +86,7 @@ class SyncCode(Persistent): binary_type_list = ('image','file','document','pickle') date_type_list = ('date',) dict_type_list = ('dict',) - pickle_type_list = ('pickle',) + pickle_type_list = ('object',) xml_object_tag = 'object' #history_tag = 'workflow_history' history_tag = 'workflow_action' diff --git a/product/ERP5SyncML/SynchronizationTool.py b/product/ERP5SyncML/SynchronizationTool.py index 6f1ab5859f..0bf9e91870 100755 --- a/product/ERP5SyncML/SynchronizationTool.py +++ b/product/ERP5SyncML/SynchronizationTool.py @@ -365,14 +365,6 @@ class SynchronizationTool( UniqueObject, SimpleItem, """ after a conflict resolution, we have decided to keep the local version of an object - - XXXC Local ? Remote ? - applyPublisherValue ? (JPS 1) - applySubscriberValue ? - applyPublicationValue ? (JPS 2) - applySubscriptionValue ? - applyPublishedValue ? (JPS 3) - applySubscribedValue ? """ object = self.unrestrictedTraverse(conflict.getObjectPath()) subscriber = conflict.getDomain() diff --git a/product/ERP5SyncML/XMLSyncUtils.py b/product/ERP5SyncML/XMLSyncUtils.py index 0c96a80534..257194210d 100755 --- a/product/ERP5SyncML/XMLSyncUtils.py +++ b/product/ERP5SyncML/XMLSyncUtils.py @@ -741,6 +741,7 @@ class XMLSyncUtils(XMLSyncUtilsMixin): force = 0 if syncml_data.count('\n') < self.MAX_LINES and (object.id.find('.')!=0): # If not we have to cut xml_object = self.getXMLObject(object=object,xml_mapping=domain.xml_mapping) + LOG('SyncModif',0,'xml_mapping: %s' % str(domain.xml_mapping)) LOG('SyncModif',0,'code: %s' % str(self.getAlertCode(remote_xml))) LOG('XMLSyncModif',0,'id_list: %s' % str(local_id_list)) LOG('XMLSyncModif',0,'hasSinature: %s' % str(subscriber.hasSignature(object.id))) -- 2.30.9