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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
c7097172
Commit
c7097172
authored
Aug 01, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Use a script to define who is Service Provider instead
parent
2f7f421d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
9 deletions
+77
-9
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Computer_checkAndUpdateAllocationScope.xml
...crm_monitoring/Computer_checkAndUpdateAllocationScope.xml
+1
-7
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_isServiceProvider.xml
..._skins/slapos_crm_monitoring/Person_isServiceProvider.xml
+74
-0
master/bt5/slapos_crm/TestTemplateItem/testSlapOSCRMSkins.py
master/bt5/slapos_crm/TestTemplateItem/testSlapOSCRMSkins.py
+1
-1
master/bt5/slapos_crm/bt/revision
master/bt5/slapos_crm/bt/revision
+1
-1
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Computer_checkAndUpdateAllocationScope.xml
View file @
c7097172
...
@@ -60,17 +60,11 @@ computer_reference = computer.getReference()\n
...
@@ -60,17 +60,11 @@ computer_reference = computer.getReference()\n
if allocation_scope not in [\'open/public\', \'open/friend\']:\n
if allocation_scope not in [\'open/public\', \'open/friend\']:\n
return\n
return\n
\n
\n
is_service_provider = False\n
person = computer.getSourceAdministrationValue(portal_type="Person")\n
person = computer.getSourceAdministrationValue(portal_type="Person")\n
if not person:\n
if not person:\n
return\n
return\n
\n
\n
for assignment in person.contentValues(portal_type="Assignment"):\n
if not person.Person_isServiceProvider():\n
if assignment.getRole() == \'service_provider\':\n
is_service_provider = True\n
break\n
\n
if not is_service_provider:\n
#Turn this computer allocation scope to \'open/personal\'\n
#Turn this computer allocation scope to \'open/personal\'\n
edit_kw = {\n
edit_kw = {\n
\'allocation_scope\': \'open/personal\',\n
\'allocation_scope\': \'open/personal\',\n
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_isServiceProvider.xml
0 → 100644
View file @
c7097172
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
if \'service_provider\' in context.getRoleList():\n
return True\n
\n
for assignment in context.contentValues(portal_type="Assignment"):\n
if assignment.getRole() == \'service_provider\':\n
return True\n
\n
return False\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_isServiceProvider
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/TestTemplateItem/testSlapOSCRMSkins.py
View file @
c7097172
...
@@ -76,7 +76,7 @@ class TestSlapOSPerson_checkToCreateRegularisationRequest(testSlapOSMixin):
...
@@ -76,7 +76,7 @@ class TestSlapOSPerson_checkToCreateRegularisationRequest(testSlapOSMixin):
ticket
.
getSource
())
ticket
.
getSource
())
expected_text_content
=
"""Dear user,
expected_text_content
=
"""Dear user,
A new invoice has been generated.
A new invoice has been generated.
You can access it in your invoice section at http://foobar.org/.
You can access it in your invoice section at http://foobar.org/.
Do not hesitate to visit the web forum (http://community.slapos.org/forum) in case of question.
Do not hesitate to visit the web forum (http://community.slapos.org/forum) in case of question.
...
...
master/bt5/slapos_crm/bt/revision
View file @
c7097172
46
47
\ No newline at end of file
\ No newline at end of file
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