Commit 5538237f authored by Georgios Dagkakis's avatar Georgios Dagkakis

BusinessTemplate.py: PortalTypeWorkflowChainTemplateItem

remove 'portal_type_workflow_chain/' from the keys in export.
This is added in _importFile and in build the key becomes the portal type
So if the business_template was exported without being built there was a diff.
parent 4edf5e59
......@@ -2520,6 +2520,16 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
def export(self, context, bta, **kw):
if not self._objects:
return
# 'portal_type_workflow_chain/' is added in _importFile
# and if the template is not built,
# it should be removed here from the key
new_objects = PersistentMapping()
for key, value in self._objects.iteritems():
new_key = deepcopy(key)
if 'portal_type_workflow_chain/' in key:
new_key = new_key.replace('portal_type_workflow_chain/', '')
new_objects[new_key] = value
self._objects = new_objects
# export workflow chain
xml_data = self.generateXml()
bta.addObject(xml_data, name='workflow_chain_type',
......
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