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
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
Xiaowu Zhang
slapos.core
Commits
30e787cf
Commit
30e787cf
authored
Dec 04, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Rely on preferences rather them on hardcoded paths
parent
be11a1bd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
108 deletions
+16
-108
master/bt5/slapos_crm/PathTemplateItem/support_request_module/slapos_crm_support_request_template_for_monitoring.xml
...le/slapos_crm_support_request_template_for_monitoring.xml
+0
-88
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Base_generateSupportRequestForSlapOS.py
...os_crm_monitoring/Base_generateSupportRequestForSlapOS.py
+5
-4
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_trySendNotificationMessage.py
...m_monitoring/SupportRequest_trySendNotificationMessage.py
+3
-2
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
...ateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
+3
-3
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+4
-9
master/bt5/slapos_crm/bt/template_path_list
master/bt5/slapos_crm/bt/template_path_list
+1
-2
No files found.
master/bt5/slapos_crm/PathTemplateItem/support_request_module/slapos_crm_support_request_template_for_monitoring.xml
deleted
100644 → 0
View file @
be11a1bd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Support Request"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
source_section/organisation_module/slapos
</string>
<string>
source_trade/organisation_module/slapos
</string>
<string>
source/organisation_module/slapos
</string>
<string>
resource/service_module/slapos_crm_monitoring
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SR-282
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_crm_support_request_template_for_monitoring
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Support Request
</string>
</value>
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<float>
0.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Template Support Request For Monitoring
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Base_generateSupportRequestForSlapOS.py
View file @
30e787cf
...
...
@@ -36,13 +36,14 @@ if support_request_in_progress is not None:
support_request
.
getAggregateUid
()
==
aggregate_value
.
getUid
():
return
portal
.
restrictedTraverse
(
support_request_in_progress
)
# Ensure resoure is Monitoring
resource
=
portal
.
service_module
.
\
slapos_crm_monitoring
.
getRelativeUrl
()
support_request
=
portal
.
\
support_request_module
.
\
slapos_crm_support_request_template_for_monitoring
.
\
Base_createCloneDocument
(
batch_mode
=
1
)
support_request
=
portal
.
restrictedTraverse
(
portal
.
portal_preferences
.
getPreferredSupportRequestTemplate
())
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
support_request
.
edit
(
title
=
title
,
description
=
description
,
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_trySendNotificationMessage.py
View file @
30e787cf
...
...
@@ -19,9 +19,10 @@ if transactional_event is not None:
(
transactional_event
.
getTitle
()
==
message_title
):
return
transactional_event
event
=
portal
.
event_module
.
slapos_crm_web_message_template
.
\
Base_createCloneDocument
(
batch_mode
=
1
)
template
=
portal
.
restrictedTraverse
(
portal
.
portal_preferences
.
getPreferredWebMessageTemplate
()
)
event
=
template
.
Base_createCloneDocument
(
batch_mode
=
1
)
event
.
edit
(
title
=
message_title
,
text_content
=
message
,
...
...
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
View file @
30e787cf
...
...
@@ -691,9 +691,9 @@ class TestSlaposCrmUpdateSupportRequestState(SlapOSTestCaseMixinWithAbort):
def
_makeSupportRequest
(
self
):
person
=
self
.
portal
.
person_module
.
template_member
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
support_request
=
self
.
portal
.
support_request_module
.
\
slapos_crm_support_request_template_for_monitoring
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
support_request
=
self
.
portal
.
restrictedTraverse
(
self
.
portal
.
portal_preferences
.
getPreferredSupportRequestTemplate
()).
\
Base_createCloneDocument
(
batch_mode
=
1
)
support_request
.
validate
()
new_id
=
self
.
generateNewId
()
support_request
.
edit
(
...
...
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
30e787cf
...
...
@@ -1183,11 +1183,9 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
self
.
_cancelTestSupportRequestList
(
"% TESTCOMPT-%"
)
def
_makeSupportRequest
(
self
):
support_request
=
self
.
portal
.
\
support_request_module
.
\
slapos_crm_support_request_template_for_monitoring
.
\
return
self
.
portal
.
restrictedTraverse
(
self
.
portal
.
portal_preferences
.
getPreferredSupportRequestTemplate
()).
\
Base_createCloneDocument
(
batch_mode
=
1
)
return
support_request
def
_makeNotificationMessage
(
self
,
reference
):
notification_message
=
self
.
portal
.
notification_message_module
.
newContent
(
...
...
@@ -1880,12 +1878,9 @@ class TestSupportRequestUpdateMonitoringState(SlapOSTestCaseMixin):
return
hosting_subscription
def
_makeSupportRequest
(
self
):
support_request
=
self
.
portal
.
\
support_request_module
.
\
slapos_crm_support_request_template_for_monitoring
.
\
return
self
.
portal
.
restrictedTraverse
(
self
.
portal
.
portal_preferences
.
getPreferredSupportRequestTemplate
()).
\
Base_createCloneDocument
(
batch_mode
=
1
)
return
support_request
@
simulate
(
'ERP5Site_isSupportRequestCreationClosed'
,
''
,
'return 0'
)
@
simulate
(
'SupportRequest_updateMonitoringDestroyRequestedState'
,
...
...
master/bt5/slapos_crm/bt/template_path_list
View file @
30e787cf
...
...
@@ -7,5 +7,4 @@ regularisation_request_module/slapos_crm_regularisation_request_template
sale_trade_condition_module/slapos_ticket_trade_condition
sale_trade_condition_module/slapos_ticket_trade_condition/**
service_module/slapos_crm_*
support_request_module/slapos_crm_support_request_template
support_request_module/slapos_crm_support_request_template_for_monitoring
\ No newline at end of file
support_request_module/slapos_crm_support_request_template
\ 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