Commit 266522ed authored by Sebastien Robin's avatar Sebastien Robin

asXML is now defined in XMLImportExport


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@332 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c17e6ac
...@@ -35,6 +35,7 @@ from Products.CMFCore.utils import _getAuthenticatedUser ...@@ -35,6 +35,7 @@ from Products.CMFCore.utils import _getAuthenticatedUser
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from Products.ERP5Type.CopySupport import CopyContainer from Products.ERP5Type.CopySupport import CopyContainer
from Products.ERP5Type import PropertySheet, Permissions from Products.ERP5Type import PropertySheet, Permissions
from Products.ERP5Type.XMLExportImport import Folder_asXML
from Products.BTreeFolder2.CMFBTreeFolder import CMFBTreeFolder from Products.BTreeFolder2.CMFBTreeFolder import CMFBTreeFolder
...@@ -525,23 +526,7 @@ be a problem).""" ...@@ -525,23 +526,7 @@ be a problem)."""
""" """
Generate an xml text corresponding to the content of this object Generate an xml text corresponding to the content of this object
""" """
xml = '' return Folder_asXML(self,ident=ident)
xml += Base.asXML(self, ident=ident)
xml = xml[:xml.rfind('</object>')]
# Make sure the list of sub objects is ordered
object_value_list = list(self.objectValues())
object_value_list.sort(lambda x, y: cmp(x.getId(), y.getId()))
# Append to the xml the xml of subobjects
for o in object_value_list:
aq_ob = aq_base(o)
if hasattr(aq_ob, 'asXML'):
o_xml = o.asXML(ident=ident+2)
if type(o_xml) is type('a'):
xml += o_xml
xml += '</object>\n'
if ident==0:
xml += '</erp5>'
return xml
# Optimized Menu System # Optimized Menu System
security.declarePublic('allowedContentTypes') security.declarePublic('allowedContentTypes')
......
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