Commit 5c991719 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_core: Keep erp5 core minimal.

As Event_send is doing nothing, we don't need it. Then, return None is enough when type based method is not found.
parent 96663ae0
......@@ -162,8 +162,8 @@ class Event(Movement, EmailDocument, AcknowledgeableMixin):
"""
send_script = self._getTypeBasedMethod('send')
if send_script is None:
raise NotImplementedError("`send` type based method not found. "
"Please update erp5_base and erp5_crm")
return
return send_script(
from_url, to_url, reply_url, subject, body, attachment_format, attachment_list,
download, **kw
......
<?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>"""Event send does nothing by default, it has to be implemented for each kind\n
of event, look at MailMessage_send for example.\n
"""\n
pass\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>from_url=None, to_url=None, reply_url=None, subject=None, body=None, attachment_format=None, attachment_list=None, download=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Event_send</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
41157
\ No newline at end of file
41158
\ 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