diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml index 82a06cf0f4c6e41a09967e46eea7573d2d707689..5dcbed2b75750a2e19eba1d23027e67fdae9c0e7 100755 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml @@ -66,11 +66,10 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n -\n -pref = sci.object\n + <value> <string>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 # deactivate all other preferences of the same level \n for p in portal.portal_preferences.searchFolder(spec=(\'ERP5 Preference\',)) :\n @@ -82,12 +81,12 @@ for p in portal.portal_preferences.searchFolder(spec=(\'ERP5 Preference\',)) :\n p.getPriority() == pref.getPriority() :\n p.portal_workflow.doActionFor(p,\n \'disable_action\',\n - wf_id=\'preference_workflow\')\n + wf_id=\'preference_workflow\', \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 -# vim: syntax=python\n </string> </value> </item> <item> @@ -141,12 +140,12 @@ for p in portal.portal_preferences.searchFolder(spec=(\'ERP5 Preference\',)) :\n <value> <tuple> <string>sci</string> - <string>Products.DCWorkflow.DCWorkflow</string> - <string>ValidationFailed</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>a</string> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/disable.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/disable.xml index 8bbcbad3bbd18191478aa3d462b848a63616a76b..9cd3dce09a0eb858edb577176a0a0813a1173682 100755 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/disable.xml +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/disable.xml @@ -41,7 +41,7 @@ <item> <key> <string>guard</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <none/> </value> </item> <item> @@ -67,27 +67,4 @@ </dictionary> </pickle> </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <tuple> - <tuple> - <string>Products.DCWorkflow.Guard</string> - <string>Guard</string> - </tuple> - <none/> - </tuple> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>roles</string> </key> - <value> - <tuple> - <string>Owner</string> - </tuple> - </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable.xml index 197d33d781c4dcb7ddb5da84f7a96c2a13c53a00..f463940a42847f5f9a0552df5861977b1eae4782 100755 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable.xml +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable.xml @@ -32,7 +32,7 @@ </item> <item> <key> <string>after_script_name</string> </key> - <value> <string></string> </value> + <value> <string>disableOtherPreferences</string> </value> </item> <item> <key> <string>description</string> </key> @@ -41,7 +41,7 @@ <item> <key> <string>guard</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <none/> </value> </item> <item> @@ -67,27 +67,4 @@ </dictionary> </pickle> </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <tuple> - <tuple> - <string>Products.DCWorkflow.Guard</string> - <string>Guard</string> - </tuple> - <none/> - </tuple> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>roles</string> </key> - <value> - <tuple> - <string>Owner</string> - </tuple> - </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable_action.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable_action.xml index 2360d9786dba608d6e57ce8e854c841c362e915f..07553476433ec6f6337b7d6e602e489b928d373d 100755 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable_action.xml +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable_action.xml @@ -54,7 +54,7 @@ </item> <item> <key> <string>script_name</string> </key> - <value> <string>disableOtherPreferences</string> </value> + <value> <string></string> </value> </item> <item> <key> <string>title</string> </key> @@ -84,6 +84,7 @@ <value> <tuple> <string>Owner</string> + <string>Manager</string> </tuple> </value> </item>