Commit 340ffc31 authored by Aurel's avatar Aurel

fix the remove Properties at diff and preinstall


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5348 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 21b7eaa5
......@@ -433,6 +433,8 @@ class ObjectTemplateItem(BaseTemplateItem):
# compare object to see it there is changes
new_object = self._objects[path]
old_object = installed_bt._objects[path]
new_object = self.removeProperties(new_object)
old_object = self.removeProperties(old_object)
new_io = StringIO()
old_io = StringIO()
OFS.XMLExportImport.exportXML(new_object._p_jar, new_object._p_oid, new_io)
......@@ -4079,12 +4081,13 @@ Business Template is a set of definitions, such as skins, portal types and categ
item_list_3 = ['_document_item', '_property_sheet_item',
'_constraint_item', '_extension_item', '_test_item',
'_message_translation_item']
if item_name in item_list_1:
f1 = StringIO()
f2 = StringIO()
# remove uneeded property
new_object.removeProperties()
installed_object.removeProperties()
new_object = new_item.removeProperties(new_object)
installed_object = installed_item.removeProperties(installed_object)
OFS.XMLExportImport.exportXML(new_object._p_jar, new_object._p_oid, f1)
OFS.XMLExportImport.exportXML(installed_object._p_jar, installed_object._p_oid, f2)
new_obj_xml = f1.getvalue()
......
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