Commit 52259368 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: add Base_castDictToXMLString

parent 4a56c93b
......@@ -34,7 +34,7 @@ from zExceptions import Unauthorized
from DateTime import DateTime
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Acquisition import aq_base, aq_inner
from slapos.util import dumps
from slapos.util import dumps, dict2xml
from lxml import etree
def cloneDocumentWithANewPortalType(obj, portal_type):
......@@ -360,3 +360,6 @@ def isValidXmlMarshaller(self, value, REQUEST=None):
# No better way them this for now
dumps(value)
return True
def convertDictToXml(self, dictionnary_value):
return dict2xml(dictionnary_value)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>convertDictToXml</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>SlapOSCloud</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_castDictToXMLString</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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