Commit f1b11bbb authored by Nicolas Delaby's avatar Nicolas Delaby

Avoid duplicate properties in asXML. id and portal_type are already xml attributes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29929 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e153163c
......@@ -657,10 +657,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
object_element = xml_copy
else:
object_element = xml_copy.xpath('//object')[0]
#XXXElement id will be removed from asXML
id_element = object_element.xpath('./id')[0]
object_element.attrib['id'] = new_id
id_element.text = new_id
return etree.tostring(xml_copy)
def getXMLFromObjectWithId(self, object, xml_mapping):
......
......@@ -83,7 +83,7 @@ def Base_asXML(object, root=None):
# We have to find every property
for prop_id in self.propertyIds():
# In most case, we should not synchronize acquired properties
if prop_id not in ('uid', 'workflow_history'):
if prop_id not in ('uid', 'workflow_history', 'id', 'portal_type',):
value = self.getProperty(prop_id)
if value is None:
prop_type = 'None'
......
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