[Erp5-report] r19304 - in /erp5/trunk/bt5/erp5_dms: WorkflowTemplateItem/portal_workflow/do...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 13 20:44:35 CET 2008
Author: jerome
Date: Wed Feb 13 20:44:35 2008
New Revision: 19304
URL: http://svn.erp5.org?rev=19304&view=rev
Log:
Call the generic script Base_checkConsistency, which deals properly with translation of ValidationFailed
Modified:
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/checkValidity.xml
erp5/trunk/bt5/erp5_dms/bt/revision
Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/checkValidity.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/checkValidity.xml?rev=19304&r1=19303&r2=19304&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/checkValidity.xml (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/checkValidity.xml Wed Feb 13 20:44:35 2008
@@ -65,23 +65,8 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string encoding="cdata"><![CDATA[
-
-"""\n
-called before submit to check if it is ok\n
-otherwise set a special variable and raise validation exception\n
-"""\n
-from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
-\n
-object = state_change[\'object\']\n
-result = object.checkConsistency()\n
-if result:\n
- message= \'The document is not valid:<br/>\'\n
- message += \'<br/>\'.join(\'- \' + str(r.message) for r in result)\n
- raise ValidationFailed(message)\n
-
-
-]]></string> </value>
+ <value> <string>state_change[\'object\'].Base_checkConsistency()\n
+</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
@@ -124,15 +109,8 @@
<value>
<tuple>
<string>state_change</string>
- <string>Products.DCWorkflow.DCWorkflow</string>
- <string>ValidationFailed</string>
+ <string>_getattr_</string>
<string>_getitem_</string>
- <string>object</string>
- <string>_getattr_</string>
- <string>result</string>
- <string>message</string>
- <string>_inplacevar_</string>
- <string>_getiter_</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_dms/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/bt/revision?rev=19304&r1=19303&r2=19304&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/bt/revision (original)
+++ erp5/trunk/bt5/erp5_dms/bt/revision Wed Feb 13 20:44:35 2008
@@ -1,1 +1,1 @@
-844
+845
More information about the Erp5-report
mailing list