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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
00efcaa3
Commit
00efcaa3
authored
Oct 27, 2017
by
Tristan Cavelier
Committed by
Cédric Le Ninivin
Jan 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SolverProcess: XXX updateLocalRolesOnSecurityGroups - Add an iteraction !
parent
c2a5926b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
product/ERP5/Document/SolverProcess.py
product/ERP5/Document/SolverProcess.py
+38
-0
No files found.
product/ERP5/Document/SolverProcess.py
View file @
00efcaa3
...
...
@@ -310,3 +310,41 @@ class SolverProcess(XMLObject, ActiveProcess):
# Folder._generateRandomId() will be called and it returns 'str' not
# 'int' id.
return
ActiveProcess
.
_generateRandomId
(
self
)
security
.
declareProtected
(
Permissions
.
ChangeLocalRoles
,
'updateLocalRolesOnSecurityGroups'
)
def
updateLocalRolesOnSecurityGroups
(
self
,
**
kw
):
"""Update roles and add groups defined on related delivery
"""
super
(
SolverProcess
,
self
).
updateLocalRolesOnSecurityGroups
(
**
kw
)
delivery_value
=
self
[
"1"
]
# XXX big hardcode !
if
delivery_value
is
not
None
:
delivery_value
=
delivery_value
.
getDeliveryValue
()
# Simulation
if
delivery_value
is
not
None
:
delivery_value
=
delivery_value
.
getDeliveryValue
()
# Sale Packing List Line
if
delivery_value
is
not
None
:
delivery_value
=
delivery_value
.
getParentValue
()
# Sale Packing List
if
delivery_value
is
not
None
:
# __ac_local_roles__ changes
# Delivery
# 'NEX-DEV' : ['Assignee', 'Auditor']
# 'NEX-LEAD' : ['Assognor']
# 'WOEL-DEV' : ['Reviewer']
# Solver
# 'NEX-DEV' : ['Assignor']
# 'NEX-LEAD': ['Assignor']
# 'WOEL-DEV': ['Assignor']
self
.
log
(
"TRISTAN delivery_value %r"
%
(
delivery_value
,))
for
group
,
local_role_list
in
delivery_value
.
__ac_local_roles__
.
items
():
self
.
log
(
"TRISTAN group, local_role_list %r"
%
((
group
,
local_role_list
),))
for
role
in
(
"Assignee"
,
"Assignor"
,
"Associate"
):
if
role
in
local_role_list
:
self
.
log
(
"TRISTAN role in local_role_list %r"
%
(
role
,))
self
.
__ac_local_roles__
.
setdefault
(
group
,
[
"Assignor"
])
break
#.updateLocalRolesOnDocument(self, **kw)
# may be need to have an interaction when _setDelivery* is called on solver process
# in order to update local roles
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