Commit 9f0e5f3d authored by Yusei Tahara's avatar Yusei Tahara

declare arguments explicitly.

remove some unused import.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20858 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 84f96845
......@@ -28,10 +28,9 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Movement import Movement
from Products.ERP5.Document.EmailDocument import EmailDocument
from Products.CMFCore.utils import getToolByName
class Event(EmailDocument, Movement):
"""
......@@ -102,7 +101,8 @@ class Event(EmailDocument, Movement):
return self
security.declareProtected(Permissions.UseMailhostServices, 'send')
def send(self, *args, **kw):
def send(self, from_url=None, to_url=None, reply_url=None, subject=None,
body=None, attachment_format=None, download=False, **kw):
"""
Make the send method overridable by typed based script
so that special kinds of events can use a different gateway
......@@ -114,5 +114,9 @@ class Event(EmailDocument, Movement):
"""
send_script = self._getTypeBasedMethod('send')
if send_script is None:
return EmailDocument.send(self, *args, **kw)
return send_script(*args, **kw)
return Event.inheritedAttribute('send')(
self, from_url, to_url, reply_url, subject, body, attachment_format, download
)
return send_script(
from_url, to_url, reply_url, subject, body, attachment_format, download, **kw
)
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