Commit 39268446 authored by Aurel's avatar Aurel

if a script defined get getBaobabSource/Destination, use it


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5872 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cd5888ff
...@@ -76,6 +76,9 @@ class CashDeliveryLine(BaobabMixin, DeliveryLine): ...@@ -76,6 +76,9 @@ class CashDeliveryLine(BaobabMixin, DeliveryLine):
""" """
Returns a calculated source Returns a calculated source
""" """
script = self._getTypeBasedMethod('getBaobabSource')
if script is not None:
return script(self)
if self.portal_type in out_portal_type_list: if self.portal_type in out_portal_type_list:
return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('sortante').getRelativeUrl() return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('sortante').getRelativeUrl()
elif self.portal_type in in_portal_type_list: elif self.portal_type in in_portal_type_list:
...@@ -87,6 +90,9 @@ class CashDeliveryLine(BaobabMixin, DeliveryLine): ...@@ -87,6 +90,9 @@ class CashDeliveryLine(BaobabMixin, DeliveryLine):
""" """
Returns a calculated destination Returns a calculated destination
""" """
script = self._getTypeBasedMethod('getBaobabDestination')
if script is not None:
return script(self)
if self.portal_type in in_portal_type_list: if self.portal_type in in_portal_type_list:
return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('entrante').getUid() return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('entrante').getUid()
elif self.portal_type in out_portal_type_list : elif self.portal_type in out_portal_type_list :
......
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