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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mukul
erp5
Commits
04e47485
Commit
04e47485
authored
Dec 12, 2013
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if no language on person, retrieve from pref & propagate it, also copy content-type from message
parent
6d434964
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
8 deletions
+17
-8
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_addEvent.xml
.../SkinTemplateItem/portal_skins/erp5_crm/Base_addEvent.xml
+2
-2
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_createEventFromDefaultEventPath.xml
...skins/erp5_crm/Entity_createEventFromDefaultEventPath.xml
+3
-0
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_setTextContentFromNotificationMessage.xml
.../erp5_crm/Event_setTextContentFromNotificationMessage.xml
+11
-5
bt5/erp5_crm/bt/revision
bt5/erp5_crm/bt/revision
+1
-1
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_addEvent.xml
View file @
04e47485
...
@@ -120,7 +120,7 @@ event = module.newContent(**event_kw)\n
...
@@ -120,7 +120,7 @@ event = module.newContent(**event_kw)\n
\n
\n
if notification_message:\n
if notification_message:\n
event.Event_setTextContentFromNotificationMessage(\n
event.Event_setTextContentFromNotificationMessage(\n
reference=notification_message)\n
reference=notification_message
, language=language
)\n
\n
\n
if not keep_draft:\n
if not keep_draft:\n
if direction == \'incoming\':\n
if direction == \'incoming\':\n
...
@@ -142,7 +142,7 @@ event.Base_redirect(keep_items={\'portal_status_message\': message})\n
...
@@ -142,7 +142,7 @@ event.Base_redirect(keep_items={\'portal_status_message\': message})\n
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
title, direction, portal_type, resource, text_content=None, notification_message=None, batch_mode=False, keep_draft=False, follow_up=None, source=None, destination=None, **kw
</string>
</value>
<value>
<string>
title, direction, portal_type, resource, text_content=None, notification_message=None, batch_mode=False, keep_draft=False, follow_up=None, source=None, destination=None,
language=None,
**kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_createEventFromDefaultEventPath.xml
View file @
04e47485
...
@@ -60,6 +60,8 @@ resource_reference = event_path.getResourceReference()\n
...
@@ -60,6 +60,8 @@ resource_reference = event_path.getResourceReference()\n
source = event_path.getSource()\n
source = event_path.getSource()\n
\n
\n
language = context.getLanguage()\n
language = context.getLanguage()\n
if not language:\n
language = portal.portal_preferences.getPreferredCustomerRelationLanguage()\n
notification_message = portal.notification_message_module.NotificationTool_getDocumentValue(\n
notification_message = portal.notification_message_module.NotificationTool_getDocumentValue(\n
resource_reference,\n
resource_reference,\n
language=language)\n
language=language)\n
...
@@ -73,6 +75,7 @@ event = context.Base_addEvent(title=\'\',\n
...
@@ -73,6 +75,7 @@ event = context.Base_addEvent(title=\'\',\n
keep_draft=keep_draft,\n
keep_draft=keep_draft,\n
follow_up=follow_up,\n
follow_up=follow_up,\n
source=source,\n
source=source,\n
language=language,\n
batch_mode=True)\n
batch_mode=True)\n
</string>
</value>
</string>
</value>
</item>
</item>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_setTextContentFromNotificationMessage.xml
View file @
04e47485
...
@@ -51,8 +51,13 @@
...
@@ -51,8 +51,13 @@
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
<value>
<string>
portal = context.getPortalObject()\n
if not language:\n
language = context.getLanguage()\n
if not language:\n
language = portal.portal_preferences.getPreferredCustomerRelationLanguage()\n
\n
notification_message = portal.portal_notifications.getDocumentValue(\n
notification_message = portal.portal_notifications.getDocumentValue(\n
language=language
or context.getLanguage()
,\n
language=language,\n
reference=reference)\n
reference=reference)\n
\n
\n
if substitution_method_parameter_dict is None:\n
if substitution_method_parameter_dict is None:\n
...
@@ -61,16 +66,17 @@ if substitution_method_parameter_dict is None:\n
...
@@ -61,16 +66,17 @@ if substitution_method_parameter_dict is None:\n
# This way notification method can return properties from recipient or follow up of the event.\n
# This way notification method can return properties from recipient or follow up of the event.\n
substitution_method_parameter_dict.setdefault(\'event_value\', context)\n
substitution_method_parameter_dict.setdefault(\'event_value\', context)\n
\n
\n
target_format = "txt"\n
if context.getTextFormat() == \'text/html\':\n
target_format = "html"\n
\n
\n
if notification_message is not None:\n
if notification_message is not None:\n
context.setTextFormat(notification_message.getTextFormat())\n
target_format = "txt"\n
if context.getTextFormat() == \'text/html\':\n
target_format = "html"\n
mime, text_content = notification_message.convert(target_format,\n
mime, text_content = notification_message.convert(target_format,\n
substitution_method_parameter_dict=substitution_method_parameter_dict)\n
substitution_method_parameter_dict=substitution_method_parameter_dict)\n
context.setTextContent(text_content)\n
context.setTextContent(text_content)\n
context.setAggregateList(notification_message.getProperty(\'aggregate_list\', []))\n
context.setAggregateList(notification_message.getProperty(\'aggregate_list\', []))\n
\n
\n
if not context.hasTitle():\n
if not context.hasTitle():\n
context.setTitle(notification_message.asSubjectText(\n
context.setTitle(notification_message.asSubjectText(\n
substitution_method_parameter_dict=substitution_method_parameter_dict))\n
substitution_method_parameter_dict=substitution_method_parameter_dict))\n
...
...
bt5/erp5_crm/bt/revision
View file @
04e47485
670
672
\ 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