[Erp5-report] r7427 - /erp5/trunk/products/ERP5Banking/Document/CashContainer.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue May 23 13:45:36 CEST 2006
Author: aurel
Date: Tue May 23 13:45:33 2006
New Revision: 7427
URL: http://svn.erp5.org?rev=7427&view=rev
Log:
allow to redefine getBaobabSource/Destination by script for cash container
Modified:
erp5/trunk/products/ERP5Banking/Document/CashContainer.py
Modified: erp5/trunk/products/ERP5Banking/Document/CashContainer.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Banking/Document/CashContainer.py?rev=7427&r1=7426&r2=7427&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/Document/CashContainer.py (original)
+++ erp5/trunk/products/ERP5Banking/Document/CashContainer.py Tue May 23 13:45:33 2006
@@ -1,6 +1,7 @@
##############################################################################
#
-# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
+# Copyright (c) 2005-2006 Nexedi SARL and Contributors. All Rights Reserved.
+# Aurelien Calonne <aurel at 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 @@
, 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()
More information about the Erp5-report
mailing list