Commit ae150f01 authored by Yusei Tahara's avatar Yusei Tahara

Fixed wrong indent.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20886 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 44cd6703
...@@ -33,90 +33,90 @@ from Products.ERP5.Document.Movement import Movement ...@@ -33,90 +33,90 @@ from Products.ERP5.Document.Movement import Movement
from Products.ERP5.Document.EmailDocument import EmailDocument from Products.ERP5.Document.EmailDocument import EmailDocument
class Event(EmailDocument, Movement): class Event(EmailDocument, Movement):
""" """
Event is the base class for all events in ERP5. Event is the base class for all events in ERP5.
Event objects include emails, phone calls, Event objects include emails, phone calls,
The purpose of an Event object is to keep track The purpose of an Event object is to keep track
of the interface between the ERP and third parties. of the interface between the ERP and third parties.
Events have a start and stop date. Events have a start and stop date.
Events may contain files and local role definitions. Events may contain files and local role definitions.
""" """
meta_type = 'ERP5 Event' meta_type = 'ERP5 Event'
portal_type = 'Event' portal_type = 'Event'
isPortalContent = 1 isPortalContent = 1
isRADContent = 1 isRADContent = 1
isDelivery = 1 isDelivery = 1
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative security
property_sheets = ( PropertySheet.Base security = ClassSecurityInfo()
, PropertySheet.XMLObject security.declareObjectProtected(Permissions.AccessContentsInformation)
, PropertySheet.CategoryCore
, PropertySheet.Document
, PropertySheet.DublinCore
, PropertySheet.Snapshot
, PropertySheet.Task
, PropertySheet.Url
, PropertySheet.TextDocument
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Event
, PropertySheet.Delivery
, PropertySheet.ItemAggregation
)
security.declareProtected(Permissions.AccessContentsInformation, # Declarative properties
'isAccountable') property_sheets = ( PropertySheet.Base
def isAccountable(self): , PropertySheet.XMLObject
""" , PropertySheet.CategoryCore
Returns 1 if this needs to be accounted , PropertySheet.Document
Only account movements which are not associated to a delivery , PropertySheet.DublinCore
Whenever delivery is there, delivery has priority , PropertySheet.Snapshot
""" , PropertySheet.Task
return 1 , PropertySheet.Url
, PropertySheet.TextDocument
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Event
, PropertySheet.Delivery
, PropertySheet.ItemAggregation
)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getQuantity') 'isAccountable')
def getQuantity(self): def isAccountable(self):
""" """
Quantity is set automatically on Events. Returns 1 if this needs to be accounted
""" Only account movements which are not associated to a delivery
# Provide opportunity to script this Whenever delivery is there, delivery has priority
return 1. """
return 1
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getExplanationValue') 'getQuantity')
def getExplanationValue(self): def getQuantity(self):
""" """
An event is it's own explanation Quantity is set automatically on Events.
""" """
return self # Provide opportunity to script this
return 1.
security.declareProtected(Permissions.UseMailhostServices, 'send') security.declareProtected(Permissions.AccessContentsInformation,
def send(self, from_url=None, to_url=None, reply_url=None, subject=None, 'getExplanationValue')
body=None, attachment_format=None, download=False, **kw): def getExplanationValue(self):
""" """
Make the send method overridable by typed based script An event is it's own explanation
so that special kinds of events can use a different gateway """
to send messages. This is useful for example to send return self
faxes through fax server or to send letters by printing
them to the printer or to send SMS through a custom security.declareProtected(Permissions.UseMailhostServices, 'send')
gateway. In the most usual case, sending will only consist def send(self, from_url=None, to_url=None, reply_url=None, subject=None,
in changing the destination. body=None, attachment_format=None, download=False, **kw):
""" """
send_script = self._getTypeBasedMethod('send') Make the send method overridable by typed based script
if send_script is None: so that special kinds of events can use a different gateway
return Event.inheritedAttribute('send')( to send messages. This is useful for example to send
self, from_url, to_url, reply_url, subject, body, attachment_format, download faxes through fax server or to send letters by printing
) them to the printer or to send SMS through a custom
return send_script( gateway. In the most usual case, sending will only consist
from_url, to_url, reply_url, subject, body, attachment_format, download, **kw in changing the destination.
"""
send_script = self._getTypeBasedMethod('send')
if send_script is None:
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