Commit 86900595 authored by Aurel's avatar Aurel

CashDelivery can redefine getBaobabSource/DEstination with script and

line must acquire it from document


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7633 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 99eaec1e
No related merge requests found
......@@ -60,3 +60,22 @@ class CashDelivery(BankingOperation):
, PropertySheet.ItemAggregation
)
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()
......@@ -74,8 +74,8 @@ class CashDeliveryLine(BaobabMixin, DeliveryLine):
"""
script = self._getTypeBasedMethod('getBaobabSource')
if script is not None:
return script(self)
return self.getSource()
return script(self)
return self.aq_parent.getBaobabSource(**kw)
security.declareProtected(Permissions.View, 'getBaobabDestination')
def getBaobabDestination(self):
......@@ -85,7 +85,7 @@ class CashDeliveryLine(BaobabMixin, DeliveryLine):
script = self._getTypeBasedMethod('getBaobabDestination')
if script is not None:
return script(self)
return self.getDestination()
return self.aq_parent.getBaobabDestination(**kw)
security.declareProtected(Permissions.View, 'getBaobabSourceVariationText')
def getBaobabSourceVariationText(self):
......
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