diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_workflowStatusModify.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_workflowStatusModify.xml
index 736f28a3b78023697999a043452dbde6d5b7d155..7af2b016a81552bd910feb1a44223a87bc73de9d 100755
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_workflowStatusModify.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_workflowStatusModify.xml
@@ -66,19 +66,25 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>o = context.getObject()\n
+            <value> <string>from Products.DCWorkflow import ValidationFailed\n
+\n
+o = context.getObject()\n
 \n
 action_list = context.portal_workflow.getActionsFor(o)\n
 action_list = filter(lambda x:x.has_key(\'id\'), action_list )\n
 action_id_list = map(lambda x:x[\'id\'], action_list)\n
 \n
 if workflow_action in action_id_list:\n
-\n
-  context.portal_workflow.doActionFor(\n
-     o,\n
+  try : \n
+    context.portal_workflow.doActionFor( o,\n
      workflow_action,\n
      comment = comment\n
      )\n
+  except ValidationFailed, message: \n
+    if not batch :\n
+      context.REQUEST.RESPONSE.redirect(\n
+                 "%s/view?portal_status_message=%s" %\n
+                 (context.absolute_url(), message))\n
 </string> </value>
         </item>
         <item>
@@ -128,13 +134,16 @@ if workflow_action in action_id_list:\n
                             <string>workflow_action</string>
                             <string>comment</string>
                             <string>batch</string>
+                            <string>Products.DCWorkflow</string>
+                            <string>ValidationFailed</string>
                             <string>_getattr_</string>
-<string>context</string>
+                            <string>context</string>
                             <string>o</string>
                             <string>action_list</string>
                             <string>filter</string>
                             <string>map</string>
                             <string>action_id_list</string>
+                            <string>message</string>
                           </tuple>
                         </value>
                     </item>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Workflow_statusModify.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Workflow_statusModify.xml
index b6f62636b6a2c5a2859ac63fbbfa1e7d71abd462..5e0536ef780ac6d9cadeec5ddaafaed27211b962 100755
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Workflow_statusModify.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Workflow_statusModify.xml
@@ -100,6 +100,9 @@ try:\n
       context,\n
       kw[\'workflow_action\'],\n
       **kw)\n
+\n
+  redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
+                                  , \'portal_status_message=Status+changed.\' )\n
 \n
 except FormValidationError, validation_errors:\n
   # Pack errors into the request\n
@@ -107,28 +110,12 @@ except FormValidationError, validation_errors:\n
   request.set(\'field_errors\', field_errors)\n
   return form(request)\n
 \n
-else:\n
-  # We will check if there\'s an error_message\n
-  history_data = None\n
-  try : \n
-    history_data = context.portal_workflow.getInfoFor(ob=context.getObject(), name=\'history\')\n
-  except AttributeError : \n
-    pass\n
-  redirect_url = None\n
-  if history_data:\n
-    last_history_data = history_data[-1]\n
-    error_message = last_history_data.get(\'error_message\')\n
-    if error_message != None and error_message != \'\':\n
-      redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
+except ValidationFailed, error_message:\n
+  redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
                                   , \'portal_status_message=%s\' % error_message\n
                                   )\n
-      pass\n
-  if redirect_url is None:\n
-    redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
-                                  , \'portal_status_message=Status+changed.\'\n
-                                  )\n
 \n
-  context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n
+context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n
 </string> </value>
         </item>
         <item>
@@ -196,12 +183,9 @@ else:\n
                             <string>listbox_line</string>
                             <string>tuple</string>
                             <string>_apply_</string>
+                            <string>redirect_url</string>
                             <string>validation_errors</string>
                             <string>field_errors</string>
-                            <string>history_data</string>
-                            <string>AttributeError</string>
-                            <string>redirect_url</string>
-                            <string>last_history_data</string>
                             <string>error_message</string>
                           </tuple>
                         </value>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log
index b75624a1bcb90213f5922143f7e3d37bf7bccc53..e3ae98449f5da41e0561f4fdb22a77012cdf4d3a 100755
--- a/product/ERP5/bootstrap/erp5_core/bt/change_log
+++ b/product/ERP5/bootstrap/erp5_core/bt/change_log
@@ -1,3 +1,6 @@
+2006-02-01 jerome
+* catch validation faileds on workflow validations and put them in portal status message
+
 2006-02-01 aurel
 * modify Base_callViewDialogMethod