[Erp5-report] r36835 tatuya - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jul 5 04:19:49 CEST 2010
Author: tatuya
Date: Mon Jul 5 04:19:47 2010
New Revision: 36835
URL: http://svn.erp5.org?rev=36835&view=rev
Log:
Revert r36804. Because the fix was ad-hoc, it should be fix more generic way.
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=36835&r1=36834&r2=36835&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Mon Jul 5 04:19:47 2010
@@ -1159,10 +1159,9 @@ class ObjectTemplateItem(BaseTemplateIte
sub_content_id in container.objectIds()])
fillRecursivePathList(self._objects.keys())
for recursive_path in recursive_path_list:
- remove_action_tuple = ('remove', 'save_and_remove')
if recursive_path in update_dict:
action = update_dict[recursive_path]
- if action in remove_action_tuple:
+ if action in ('remove', 'save_and_remove'):
document = portal.restrictedTraverse(recursive_path, None)
if document is None:
# It happens if the parent of target path is removed before
@@ -1176,11 +1175,6 @@ class ObjectTemplateItem(BaseTemplateIte
container_path_list = recursive_path.split('/')[:-1]
self._backupObject(action, trashbin, container_path_list,
document_id)
- container_path = os.path.dirname(recursive_path)
- if container_path in update_dict and \
- update_dict[container_path] in remove_action_tuple:
- # If parent is removed, no need to remove the sub directory.
- continue
parent.manage_delObjects([document_id])
else:
# for old business template format
@@ -1231,12 +1225,6 @@ class ObjectTemplateItem(BaseTemplateIte
unregisterSkinFolder(container, skin_folder,
container.getSkinSelections())
- remove_dict = kw.get('remove_object_dict', {})
- container_path_name = os.path.dirname(relative_url)
- if container_path_name in remove_dict and \
- remove_dict[container_path_name] in ('remove', 'save_and_remove'):
- # If parent is removed, no need to remove the sub directory.
- continue
container.manage_delObjects([object_id])
if container.aq_parent.meta_type == 'ERP5 Catalog' and not len(container):
# We are removing a ZSQLMethod, remove the SQLCatalog if empty
More information about the Erp5-report
mailing list