[Erp5-report] r32760 luke - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateI...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 18 12:52:50 CET 2010
Author: luke
Date: Thu Feb 18 12:52:46 2010
New Revision: 32760
URL: http://svn.erp5.org?rev=32760&view=rev
Log:
- do not try to expire category if transition is not possible
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.xml?rev=32760&r1=32759&r2=32760&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.xml [utf8] Thu Feb 18 12:52:46 2010
@@ -291,9 +291,14 @@
category.edit(**{\'expiration_date\':expiration_date})\n
else:\n
for category in category_to_delete_list:\n
- category = context.portal_categories.resolveCategory(category)\n
- if category is not None:\n
- category.expire()\n
+ expiration_possible = context.getPortalObject().portal_workflow \\\n
+ .isTransitionPossible(category, \'expire\')\n
+ break\n
+ if expiration_possible:\n
+ for category in category_to_delete_list:\n
+ category = context.portal_categories.resolveCategory(category)\n
+ if category is not None:\n
+ category.expire()\n
\n
\n
\n
@@ -428,6 +433,7 @@
<string>category_to_delete_list</string>
<string>base_category_id</string>
<string>parent</string>
+ <string>expiration_possible</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=32760&r1=32759&r2=32760&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Thu Feb 18 12:52:46 2010
@@ -1,1 +1,1 @@
-1476
+1477
More information about the Erp5-report
mailing list