Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
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
Romain Courteaud
slapos.core
Commits
e94a14f4
Commit
e94a14f4
authored
Nov 05, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: group is mandatory for accountant Manager|Agent
parent
3ed044ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
...teItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
+7
-4
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
View file @
e94a14f4
...
...
@@ -163,20 +163,23 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
# Reset values set on script_ComputeNode_requestSoftwareReleaseChange
self
.
portal
.
REQUEST
.
set
(
key
,
None
)
def
_addAssignment
(
self
,
person
,
function
,
project
=
None
):
def
_addAssignment
(
self
,
person
,
function
,
project
=
None
,
**
kw
):
assignment
=
person
.
newContent
(
portal_type
=
'Assignment'
,
destination_project_value
=
project
,
function
=
function
function
=
function
,
**
kw
)
assignment
.
open
()
return
assignment
def
addAccountingManagerAssignment
(
self
,
person
):
return
self
.
_addAssignment
(
person
,
'accounting/manager'
)
# group is mandatory for accountant
return
self
.
_addAssignment
(
person
,
'accounting/manager'
,
group
=
'company'
)
def
addAccountingAgentAssignment
(
self
,
person
):
return
self
.
_addAssignment
(
person
,
'accounting/agent'
)
# group is mandatory for accountant
return
self
.
_addAssignment
(
person
,
'accounting/agent'
,
group
=
'company'
)
def
addSaleManagerAssignment
(
self
,
person
):
return
self
.
_addAssignment
(
person
,
'sale/manager'
)
...
...
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