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
Matevz Golob
erp5
Commits
9840e315
Commit
9840e315
authored
Jul 15, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Base.py, InteractionWorkflow.py, State.py, Transition.py: clean up.
parent
2cc6b43c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
56 deletions
+1
-56
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+1
-1
product/ERP5Workflow/Document/Interaction.py
product/ERP5Workflow/Document/Interaction.py
+0
-24
product/ERP5Workflow/Document/State.py
product/ERP5Workflow/Document/State.py
+0
-21
product/ERP5Workflow/Document/Transition.py
product/ERP5Workflow/Document/Transition.py
+0
-10
No files found.
product/ERP5Type/Base.py
View file @
9840e315
...
...
@@ -3006,7 +3006,7 @@ class Base( CopyContainer,
local_permission_list
=
(
local_permission_list
,)
setattr
(
self
,
permission_name
,
tuple
(
local_permission_list
))
#
##
Content accessor methods
# Content accessor methods
security
.
declareProtected
(
Permissions
.
View
,
'getSearchableText'
)
def
getSearchableText
(
self
,
md
=
None
):
"""
...
...
product/ERP5Workflow/Document/Interaction.py
View file @
9840e315
...
...
@@ -102,16 +102,6 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
self
.
generateGuard
()
return
self
.
guard
def
getVarExprText
(
self
,
id
):
if
not
self
.
var_exprs
:
return
''
else
:
expr
=
self
.
var_exprs
.
get
(
id
,
None
)
if
expr
is
not
None
:
return
expr
.
text
else
:
return
''
def
generateGuard
(
self
):
if
self
.
trigger_type
==
TRIGGER_USER_ACTION
:
if
self
.
guard
==
None
:
...
...
@@ -119,7 +109,6 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
roles
=
self
.
getRoleList
(),
groups
=
self
.
getGroupList
(),
expr
=
self
.
getExpression
())
if
self
.
guard
.
roles
!=
self
.
getRoleList
():
self
.
guard
.
roles
=
self
.
getRoleList
()
elif
self
.
guard
.
permissions
!=
self
.
getPermissionList
():
...
...
@@ -133,16 +122,3 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
if
type
(
self
.
method_id
)
is
type
(
''
):
self
.
method_id
=
self
.
method_id
.
split
()
return
self
.
method_id
def
getVarExprText
(
self
,
id
):
if
not
self
.
var_exprs
:
return
''
else
:
expr
=
self
.
var_exprs
.
get
(
id
,
None
)
if
expr
is
not
None
:
return
expr
.
text
else
:
return
''
def
getWorkflow
(
self
):
return
aq_parent
(
aq_inner
(
aq_parent
(
aq_inner
(
self
))))
product/ERP5Workflow/Document/State.py
View file @
9840e315
...
...
@@ -121,24 +121,3 @@ class State(IdAsReferenceMixin("state_", "prefix"), XMLObject, XMLMatrix):
for
tr
in
self
.
getDestinationValueList
():
ref_list
.
append
(
tr
.
getReference
())
return
ref_list
def
setGroups
(
self
,
REQUEST
,
RESPONSE
=
None
):
"""Set the group to role mappings in REQUEST for this State.
"""
map
=
self
.
group_roles
if
map
is
None
:
self
.
group_roles
=
map
=
PersistentMapping
()
map
.
clear
()
all_roles
=
self
.
getWorkflow
().
getRoles
()
for
group
in
self
.
getWorkflow
().
getGroups
():
roles
=
[]
for
role
in
all_roles
:
if
REQUEST
.
get
(
'%s|%s'
%
(
group
,
role
),
0
):
roles
.
append
(
role
)
roles
.
sort
()
roles
=
tuple
(
roles
)
map
[
group
]
=
roles
if
RESPONSE
is
not
None
:
RESPONSE
.
redirect
(
"%s/manage_groups?manage_tabs_message=Groups+changed."
%
self
.
absolute_url
())
product/ERP5Workflow/Document/Transition.py
View file @
9840e315
...
...
@@ -94,16 +94,6 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject):
self
.
generateGuard
()
return
self
.
guard
def
getVarExprText
(
self
,
id
):
if
not
self
.
var_exprs
:
return
''
else
:
expr
=
self
.
var_exprs
.
get
(
id
,
None
)
if
expr
is
not
None
:
return
expr
.
text
else
:
return
''
def
generateGuard
(
self
):
if
self
.
trigger_type
==
TRIGGER_USER_ACTION
:
if
self
.
guard
==
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