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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
b1b2d07d
Commit
b1b2d07d
authored
Oct 19, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crm: interaction to set source to the user who open a SR
parent
8473e65c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
342 additions
and
1 deletion
+342
-1
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testCRMSupportRequest.py
...Item/portal_components/test.erp5.testCRMSupportRequest.py
+45
-0
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testCRMSupportRequest.xml
...tem/portal_components/test.erp5.testCRMSupportRequest.xml
+123
-0
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/ticket_interaction_workflow.xml
...plateItem/portal_workflow/ticket_interaction_workflow.xml
+1
-1
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/ticket_interaction_workflow/interactions/SupportRequest_setSource.xml
...action_workflow/interactions/SupportRequest_setSource.xml
+102
-0
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/ticket_interaction_workflow/scripts/SupportRequest_setSource.py
..._interaction_workflow/scripts/SupportRequest_setSource.py
+7
-0
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/ticket_interaction_workflow/scripts/SupportRequest_setSource.xml
...interaction_workflow/scripts/SupportRequest_setSource.xml
+62
-0
bt5/erp5_crm/bt/template_test_id_list
bt5/erp5_crm/bt/template_test_id_list
+1
-0
bt5/erp5_crm/bt/test_dependency_list
bt5/erp5_crm/bt/test_dependency_list
+1
-0
No files found.
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testCRMSupportRequest.py
0 → 100644
View file @
b1b2d07d
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
class
TestSupportRequestnterractions
(
ERP5TypeTestCase
):
def
createPersonUser
(
self
,
roles
=
()):
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,)
person
.
newContent
(
portal_type
=
'Assignment'
).
open
()
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
self
.
newPassword
(),
password
=
self
.
newPassword
())
for
_
in
range
(
5
):
# try to get a non-used login
if
login
.
checkConsistency
():
login
.
setReference
(
self
.
newPassword
())
login
.
validate
()
person
.
validate
()
self
.
tic
()
for
role
in
roles
:
self
.
portal
.
acl_users
.
zodb_roles
.
assignRoleToPrincipal
(
role
,
person
.
getUserId
())
return
person
def
test_SupportRequest_setSource_on_open
(
self
):
"""The user opening a support request will automatically be set as
"Operation Manager" on the support request.
"""
support_request
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
'Support Request'
,
title
=
self
.
id
())
support_request
.
submit
()
self
.
tic
()
self
.
assertIsNone
(
support_request
.
getSource
())
person
=
self
.
createPersonUser
((
'Assignor'
,
))
self
.
login
(
person
.
getUserId
())
self
.
portal
.
portal_workflow
.
doActionFor
(
support_request
,
'validate_action'
)
self
.
assertEqual
(
person
,
support_request
.
getSourceValue
())
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testCRMSupportRequest.xml
0 → 100644
View file @
b1b2d07d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testCRMSupportRequest
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testCRMSupportRequest
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/ticket_interaction_workflow.xml
View file @
b1b2d07d
...
...
@@ -20,7 +20,7 @@
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Update local roles when changing the related persons / organisations.
</string>
</value>
<value>
<string>
Interactions on tickets
</string>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
...
...
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/ticket_interaction_workflow/interactions/SupportRequest_setSource.xml
0 → 100644
View file @
b1b2d07d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionDefinition"
module=
"Products.ERP5.Interaction"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
activate_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<list>
<string>
SupportRequest_setSource
</string>
</list>
</value>
</item>
<item>
<key>
<string>
before_commit_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupportRequest_setSource
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
validate
</string>
</list>
</value>
</item>
<item>
<key>
<string>
once_per_transaction
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<list>
<string>
Support Request
</string>
</list>
</value>
</item>
<item>
<key>
<string>
portal_type_group_filter
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/ticket_interaction_workflow/scripts/SupportRequest_setSource.py
0 → 100644
View file @
b1b2d07d
"""User opening the support request will be set a source.
"""
support_request
=
sci
[
'object'
]
portal
=
support_request
.
getPortalObject
()
user
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
if
user
is
not
None
and
not
support_request
.
getSource
():
support_request
.
setSourceValue
(
user
)
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/ticket_interaction_workflow/scripts/SupportRequest_setSource.xml
0 → 100644
View file @
b1b2d07d
<?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>
_params
</string>
</key>
<value>
<string>
sci
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupportRequest_setSource
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/bt/template_test_id_list
0 → 100644
View file @
b1b2d07d
test.erp5.testCRMSupportRequest
\ No newline at end of file
bt5/erp5_crm/bt/test_dependency_list
0 → 100644
View file @
b1b2d07d
erp5_full_text_mroonga_catalog
\ 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