[Erp5-report] r10928 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 25 12:00:16 CEST 2006
Author: kevin
Date: Wed Oct 25 12:00:10 2006
New Revision: 10928
URL: http://svn.erp5.org?rev=10928&view=rev
Log:
Sort objects to remove in reverse order to delete leaf first in a tree
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=10928&r1=10927&r2=10928&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Wed Oct 25 12:00:10 2006
@@ -354,6 +354,7 @@
remove_dict = kw.get('remove_object_dict', {})
keys = self._objects.keys()
keys.sort()
+ keys.reverse()
# if you choose remove, the object and all its subobjects will be removed
# even if you choose backup or keep for subobjects
# it is same behaviour for backup_and_remove, all we be save
@@ -4115,6 +4116,7 @@
if action == 'remove' or action == 'save_and_remove':
remove_object_dict[path] = action
object_to_update.pop(path)
+
# remove object from old business template
if len(remove_object_dict) > 0:
for item_name in installed_bt._item_name_list:
More information about the Erp5-report
mailing list