[Erp5-report] r21738 - in /erp5/trunk/bt5/erp5_forge: ExtensionTemplateItem/ SkinTemplateIt...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jun 23 11:59:18 CEST 2008
Author: aurel
Date: Mon Jun 23 11:59:10 2008
New Revision: 21738
URL: http://svn.erp5.org?rev=21738&view=rev
Log:
do not reset guard when updating wf transitions
Modified:
erp5/trunk/bt5/erp5_forge/ExtensionTemplateItem/Glossary.py
erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_updateWorkflowByTerm.xml
erp5/trunk/bt5/erp5_forge/bt/revision
Modified: erp5/trunk/bt5/erp5_forge/ExtensionTemplateItem/Glossary.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/ExtensionTemplateItem/Glossary.py?rev=21738&r1=21737&r2=21738&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/ExtensionTemplateItem/Glossary.py (original)
+++ erp5/trunk/bt5/erp5_forge/ExtensionTemplateItem/Glossary.py Mon Jun 23 11:59:10 2008
@@ -84,3 +84,12 @@
self._i18n_message_id_dict = {msgid:None}
return TALInterpreter.translate(self, msgid, default, i18ndict, obj)
+
+
+from Products.DCWorkflow.Transitions import TransitionDefinition
+def setGuard(self, guard):
+ if isinstance(self, TransitionDefinition):
+ self.guard = guard
+ else:
+ raise ValueError, "not a TransitionDefinition"
+
Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_updateWorkflowByTerm.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_updateWorkflowByTerm.xml?rev=21738&r1=21737&r2=21738&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_updateWorkflowByTerm.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_updateWorkflowByTerm.xml Mon Jun 23 11:59:10 2008
@@ -92,6 +92,7 @@
wf_item.setProperties(term.getTitle(), description=term.getDescription(),\n
transitions=wf_item.transitions, type_list=wf_item.type_list)\n
else: # wf_item.meta_type == "Workflow Transition"\n
+ guard = getattr(wf_item, \'guard\', None)\n
if not is_action:\n
wf_item.setProperties(\n
term.getTitle(),\n
@@ -103,7 +104,7 @@
after_script_name=wf_item.after_script_name,\n
actbox_name = wf_item.actbox_name,\n
actbox_url = wf_item.actbox_url,\n
- actbox_category = wf_item.actbox_category)\n
+ actbox_category = wf_item.actbox_category,)\n
else:\n
wf_item.setProperties(\n
wf_item.title,\n
@@ -115,7 +116,10 @@
after_script_name=wf_item.after_script_name,\n
actbox_name = term.getTitle(),\n
actbox_url = wf_item.actbox_url,\n
- actbox_category = wf_item.actbox_category)\n
+ actbox_category = wf_item.actbox_category,)\n
+ if guard is not None:\n
+ wf_item.Glossary_setGuard(guard)\n
+\n
\n
portal_status_message = context.Base_translateString(\'Workflows updated.\')\n
context.Base_redirect(keep_items={\'portal_status_message\':portal_status_message})\n
@@ -142,6 +146,12 @@
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
+ </item>
+ <item>
+ <key> <string>_proxy_roles</string> </key>
+ <value>
+ <tuple/>
+ </value>
</item>
<item>
<key> <string>errors</string> </key>
@@ -186,6 +196,9 @@
<string>term</string>
<string>wf_item_path</string>
<string>wf_item</string>
+ <string>getattr</string>
+ <string>None</string>
+ <string>guard</string>
<string>portal_status_message</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_forge/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/revision?rev=21738&r1=21737&r2=21738&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/revision (original)
+++ erp5/trunk/bt5/erp5_forge/bt/revision Mon Jun 23 11:59:10 2008
@@ -1,1 +1,1 @@
-249
+252
More information about the Erp5-report
mailing list