Commit acef3d24 authored by Aurel's avatar Aurel

allow to redefine getBaobabSource/Destination by script for cash container


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7427 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b6e6ca6
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005-2006 Nexedi SARL and Contributors. All Rights Reserved.
# Aurelien Calonne <aurel@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
......@@ -64,3 +65,23 @@ class CashContainer(Container):
, PropertySheet.CashContainer
, PropertySheet.Reference
)
security.declareProtected(Permissions.View, 'getBaobabSource')
def getBaobabSource(self):
"""
Returns a calculated source
"""
script = self._getTypeBasedMethod('getBaobabSource')
if script is not None:
return script(self)
return self.getSource()
security.declareProtected(Permissions.View, 'getBaobabDestination')
def getBaobabDestination(self):
"""
Returns a calculated destination
"""
script = self._getTypeBasedMethod('getBaobabDestination')
if script is not None:
return script(self)
return self.getDestination()
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