Commit 0c17e6ac authored by Sebastien Robin's avatar Sebastien Robin

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
parent ece6cf1a
......@@ -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):
......
......@@ -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'
......
......@@ -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()
......
......@@ -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)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment