Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Lukas Niegsch
erp5
Commits
8f05514e
Commit
8f05514e
authored
May 06, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InteractionWorkflow.py: change the name of universal method for the initialization of document.
parent
8a9c57e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
product/ERP5Workflow/Document/InteractionWorkflow.py
product/ERP5Workflow/Document/InteractionWorkflow.py
+4
-10
No files found.
product/ERP5Workflow/Document/InteractionWorkflow.py
View file @
8f05514e
...
...
@@ -53,7 +53,6 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
"""
An ERP5 Interaction Workflow.
"""
meta_type
=
'ERP5 Workflow'
portal_type
=
'Interaction Workflow'
_isAWorkflow
=
True
# DCWorkflow Tool compatibility
...
...
@@ -68,8 +67,6 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
intaractions
=
None
manager_bypass
=
0
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
...
...
@@ -85,7 +82,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
)
def
initializeDocument
(
self
,
document
):
def
notifyCreated
(
self
,
document
):
pass
security
.
declareProtected
(
Permissions
.
View
,
'getChainedPortalTypeList'
)
...
...
@@ -129,7 +126,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
Allows the user to request information provided by the
workflow. This method must perform its own security checks.
'''
vdef
=
self
.
_getOb
(
name
,
_MARKER
)
### getObjectByRef
vdef
=
self
.
_getOb
(
name
,
_MARKER
)
if
vdef
is
_MARKER
:
return
default
if
vdef
.
info_guard
is
not
None
and
not
vdef
.
info_guard
.
check
(
...
...
@@ -148,7 +145,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
return
value
security
.
declarePrivate
(
'isWorkflowMethodSupported'
)
def
is
ERP5
WorkflowMethodSupported
(
self
,
ob
,
tid
):
def
isWorkflowMethodSupported
(
self
,
ob
,
tid
):
'''
Returns a true value if the given workflow method
is supported in the current state.
...
...
@@ -159,8 +156,6 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
return
1
return
0
isWorkflowMethodSupported
=
isERP5WorkflowMethodSupported
def
_checkTransitionGuard
(
self
,
tdef
,
document
,
**
kw
):
if
tdef
.
temporary_document_disallowed
:
isTempDocument
=
getattr
(
document
,
'isTempDocument'
,
None
)
...
...
@@ -271,8 +266,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
filtered_transition_list
=
[]
for
t_id
in
transition_list
:
LOG
(
" t_id is '%s'"
%
t_id
,
WARNING
,
" in InteractionWorkflow.py 247."
)
tdef
=
self
.
_getOb
(
t_id
)
# t_id is id or reference?
tdef
=
self
.
_getOb
(
t_id
)
assert
tdef
.
trigger_type
==
TRIGGER_WORKFLOW_METHOD
filtered_transition_list
.
append
(
tdef
.
getId
())
former_status
=
self
.
_getOb
(
status_dict
[
self
.
getStateVariable
()],
None
)
...
...
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