[Erp5-report] r6885 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/po...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 24 14:12:56 CEST 2006
Author: jerome
Date: Mon Apr 24 14:12:55 2006
New Revision: 6885
URL: http://svn.erp5.org?rev=6885&view=rev
Log:
Clear the cache when validating a preference
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml?rev=6885&r1=6884&r2=6885&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml Mon Apr 24 14:12:55 2006
@@ -66,10 +66,13 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>pref = sci.object\n
+ <value> <string>from Products.ERP5Type.Cache import clearCache\n
+from Products.ERP5Type.Message import Message\n
+\n
+pref = sci.object\n
portal = sci.getPortal()\n
LOG = lambda msg: pref.log("PreferenceWorkflow.disableOtherPreferences on %s"%pref, msg)\n
-N_ = context.Base_translateString\n
+N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
\n
# deactivate all other preferences of the same level \n
for p in portal.portal_preferences.searchFolder(spec=(\'ERP5 Preference\',)) :\n
@@ -82,11 +85,12 @@
p.portal_workflow.doActionFor(p,\n
\'disable_action\',\n
wf_id=\'preference_workflow\', \n
- comment=N_(\'automatically disabled when enabling ${preference_title}\',\n
+ comment=N_(\'Automatically disabled when enabling ${preference_title}\',\n
mapping={\'preference_title\': context.getTitle()}) )\n
- LOG(\'Deactivated %s\'%p)\n
except \'Unauthorized\', a :\n
LOG("not authorized to deactivate %s"%p)\n
+\n
+clearCache(method_id="PreferenceTool.CachingMethod.")\n
</string> </value>
</item>
<item>
@@ -140,14 +144,18 @@
<value>
<tuple>
<string>sci</string>
+ <string>Products.ERP5Type.Cache</string>
+ <string>clearCache</string>
+ <string>Products.ERP5Type.Message</string>
+ <string>Message</string>
<string>_getattr_</string>
<string>pref</string>
<string>portal</string>
<string>LOG</string>
- <string>context</string>
<string>N_</string>
<string>_getiter_</string>
<string>p</string>
+ <string>context</string>
<string>a</string>
</tuple>
</value>
More information about the Erp5-report
mailing list