Commit 8e109faf authored by Ivan Tyagov's avatar Ivan Tyagov

Add a new preference which can control if outgoing events (i.e. Mail

Messages) are to be stored inside CRM event_module.
parent 25fa2406
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</item> </item>
<item> <item>
<key> <string>last_id</string> </key> <key> <string>last_id</string> </key>
<value> <string>4</string> </value> <value> <string>6</string> </value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>mode</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/boolean</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>If set will store all outgoing events (i.e. Mail Message) inside ERP5 CRM module.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>preferred_store_events_property</string> </value>
</item>
<item>
<key> <string>mode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>preference</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: True</string> </value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value> <string>Manage properties</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -64,7 +64,8 @@ context.REQUEST.set(\'came_from\', context.getUrlString())\n ...@@ -64,7 +64,8 @@ context.REQUEST.set(\'came_from\', context.getUrlString())\n
\n \n
portal.portal_password.mailPasswordResetRequest(user_login=reference,\n portal.portal_password.mailPasswordResetRequest(user_login=reference,\n
REQUEST=context.REQUEST,\n REQUEST=context.REQUEST,\n
notification_message=notification_message)\n notification_message=notification_message,\n
store_as_event=portal.portal_preferences.isPreferredStoreEvents())\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
recipient = context.getDestinationDecisionValue(portal_type="Person")\n recipient = context.getDestinationDecisionValue(portal_type="Person")\n
\n \n
\n
#Define the type of notification\n #Define the type of notification\n
notification_type = "without-password"\n notification_type = "without-password"\n
if password:\n if password:\n
...@@ -93,7 +92,7 @@ portal.portal_notifications.sendMessage(\n ...@@ -93,7 +92,7 @@ portal.portal_notifications.sendMessage(\n
message=mail_text,\n message=mail_text,\n
message_text_format=notification_message.getContentType(),\n message_text_format=notification_message.getContentType(),\n
notifier_list=(portal.portal_preferences.getPreferredLoginAndPasswordNotifier(),),\n notifier_list=(portal.portal_preferences.getPreferredLoginAndPasswordNotifier(),),\n
store_as_event=True,\n store_as_event= portal.portal_preferences.isPreferredStoreEvents(),\n
event_keyword_argument_dict={\'follow_up\':context.getRelativeUrl()},\n event_keyword_argument_dict={\'follow_up\':context.getRelativeUrl()},\n
)\n )\n
</string> </value> </string> </value>
......
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
<string>my_preferred_ask_credential_question</string> <string>my_preferred_ask_credential_question</string>
<string>my_preferred_email_verification_check</string> <string>my_preferred_email_verification_check</string>
<string>my_preferred_system_generate_password</string> <string>my_preferred_system_generate_password</string>
<string>my_preferred_store_events</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_store_events</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Store Outgoing Events</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
389 390
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment