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
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
Amer
erp5
Commits
3021c83e
Commit
3021c83e
authored
Apr 01, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CRM: Allow to choose the sender when creating a response
parent
954f011d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
222 additions
and
6 deletions
+222
-6
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createResponse.xml
...mplateItem/portal_skins/erp5_crm/Event_createResponse.xml
+2
-2
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getPreferredResponseEventSource.xml
..._skins/erp5_crm/Event_getPreferredResponseEventSource.xml
+72
-0
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getPreferredResponseEventSourceItemList.xml
...rp5_crm/Event_getPreferredResponseEventSourceItemList.xml
+77
-0
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateResponseDialog.xml
.../portal_skins/erp5_crm/Event_viewCreateResponseDialog.xml
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateResponseDialog/my_default_destination.xml
...Event_viewCreateResponseDialog/my_default_destination.xml
+70
-3
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createResponse.xml
View file @
3021c83e
...
...
@@ -56,7 +56,7 @@ portal = context.getPortalObject()\n
module = portal.getDefaultModule(response_event_portal_type)\n
\n
response = module.newContent(portal_type=response_event_portal_type,\n
source=
context.getDestination()
,\n
source=
default_destination
,\n
destination=context.getSource(),\n
resource=response_event_resource,\n
title=response_event_title,\n
...
...
@@ -87,7 +87,7 @@ else:\n
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
form_id=None, response_event_portal_type=None, response_event_resource=None, response_event_title=None, response_event_text_content=None, response_event_start_date=None, response_workflow_action=None, response_event_notification_message=None, response_event_content_type=None, **kw
</string>
</value>
<value>
<string>
form_id=None, response_event_portal_type=None, response_event_resource=None, response_event_title=None, response_event_text_content=None, response_event_start_date=None, response_workflow_action=None, response_event_notification_message=None,
default_destination=None,
response_event_content_type=None, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getPreferredResponseEventSource.xml
0 → 100644
View file @
3021c83e
<?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>
"""Returns the default sender for response events.\n
\n
This script is here so that we can easily customized depending on the context event, ticket or user preferences.\n
"""\n
\n
return context.Event_getPreferredResponseEventSourceItemList()[-1][1]\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Event_getPreferredResponseEventSource
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getPreferredResponseEventSourceItemList.xml
0 → 100644
View file @
3021c83e
<?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>
"""Returns the possible senders to choose from when creating a response event.\n
\n
"""\n
item_list = [ (\'\', \'\'),\n
(context.getDestinationTitle(), context.getDestination()) ]\n
\n
logged_in_user = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
if logged_in_user is not None and logged_in_user.getRelativeUrl() != context.getDestination():\n
item_list.append((logged_in_user.getTitle(), logged_in_user.getRelativeUrl()))\n
\n
return item_list\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Event_getPreferredResponseEventSourceItemList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateResponseDialog.xml
View file @
3021c83e
...
...
@@ -95,7 +95,7 @@
<key>
<string>
right
</string>
</key>
<value>
<list>
<string>
my_default_destination
_title
</string>
<string>
my_default_destination
</string>
<string>
my_default_source_title
</string>
</list>
</value>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateResponseDialog/my_default_destination
_title
.xml
→
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateResponseDialog/my_default_destination.xml
View file @
3021c83e
...
...
@@ -10,13 +10,16 @@
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
items
</string>
<string>
required
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_default_destination
_title
</string>
</value>
<value>
<string>
my_default_destination
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
@@ -52,6 +55,12 @@
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -60,10 +69,20 @@
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -71,13 +90,27 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_
destination_title
</string>
</value>
<value>
<string>
my_
list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewCRMFieldLibrary
</string>
</value>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
...
...
@@ -87,10 +120,44 @@
<key>
<string>
title
</string>
</key>
<value>
<string>
Sender or Caller
</string>
</value>
</item>
<item>
<key>
<string>
view_separator
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<br />
]]>
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
context/Event_getPreferredResponseEventSource
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
context/Event_getPreferredResponseEventSourceItemList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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