[Erp5-report] r24710 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Nov 26 16:50:41 CET 2008
Author: ivan
Date: Wed Nov 26 16:50:33 2008
New Revision: 24710
URL: http://svn.erp5.org?rev=24710&view=rev
Log:
If a business template contains skin folder which registers a new skin make sure that when this skin folder is uninstalled
the skin is removed from portal_skins tool.
This way both install/uninstall process is consistent with respect to skin handling.
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=24710&r1=24709&r2=24710&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Wed Nov 26 16:50:33 2008
@@ -966,7 +966,13 @@
# in case object is already backup and/or removed
if trash and trashbin is not None:
self.portal_trash.backupObject(trashbin, container_path, object_id, save=1, keep_subobjects=1)
- container.manage_delObjects([object_id])
+ if container.meta_type == 'CMF Skins Tool':
+ # we are removing a skin folder, check and remove if registered skin selection
+ skin_folder = container[object_id]
+ registered_skin_selections = getattr(skin_folder, 'business_template_registered_skin_selections', None)
+ if registered_skin_selections is not None:
+ container.manage_skinLayers(chosen=registered_skin_selections, del_skin=1)
+ container.manage_delObjects([object_id])
if container.aq_parent.meta_type == 'ERP5 Catalog' and len(container.objectIds()) == 0:
# We are removing a ZSQLMethod, remove the SQLCatalog if empty
container.getParentValue().manage_delObjects([container.id])
More information about the Erp5-report
mailing list