Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
51502add
Commit
51502add
authored
Mar 12, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transition.py: Import ValidationFailed and register exception error_message.
parent
fb6cbb9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
product/ERP5Workflow/Document/Transition.py
product/ERP5Workflow/Document/Transition.py
+3
-0
No files found.
product/ERP5Workflow/Document/Transition.py
View file @
51502add
...
@@ -36,7 +36,9 @@ from Products.DCWorkflow.Expression import StateChangeInfo
...
@@ -36,7 +36,9 @@ from Products.DCWorkflow.Expression import StateChangeInfo
from
zLOG
import
LOG
,
ERROR
,
DEBUG
,
WARNING
from
zLOG
import
LOG
,
ERROR
,
DEBUG
,
WARNING
from
Products.ERP5Type.Utils
import
convertToUpperCase
,
convertToMixedCase
from
Products.ERP5Type.Utils
import
convertToUpperCase
,
convertToMixedCase
from
Products.DCWorkflow.DCWorkflow
import
ObjectDeleted
,
ObjectMoved
from
Products.DCWorkflow.DCWorkflow
import
ObjectDeleted
,
ObjectMoved
from
Products.ERP5Type.patches.DCWorkflow
import
ValidationFailed
from
copy
import
deepcopy
from
copy
import
deepcopy
import
sys
from
Products.ERP5Type.patches.WorkflowTool
import
WorkflowHistoryList
from
Products.ERP5Type.patches.WorkflowTool
import
WorkflowHistoryList
#from Products.ERP5Workflow.Document.Guard import Guard
#from Products.ERP5Workflow.Document.Guard import Guard
from
Products.DCWorkflow.Guard
import
Guard
from
Products.DCWorkflow.Guard
import
Guard
...
@@ -187,6 +189,7 @@ class Transition(XMLObject):
...
@@ -187,6 +189,7 @@ class Transition(XMLObject):
document
,
workflow
,
former_status
,
self
,
old_sdef
,
new_sdef
,
kwargs
)
document
,
workflow
,
former_status
,
self
,
old_sdef
,
new_sdef
,
kwargs
)
# put the error message in the workflow history
# put the error message in the workflow history
sci
.
setWorkflowVariable
(
error_message
=
before_script_error_message
)
sci
.
setWorkflowVariable
(
error_message
=
before_script_error_message
)
status_dict
[
'error_message'
]
=
before_script_error_message
if
validation_exc
:
if
validation_exc
:
# reraise validation failed exception
# reraise validation failed exception
raise
validation_exc
,
None
,
validation_exc_traceback
raise
validation_exc
,
None
,
validation_exc_traceback
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment