Commit 98061911 authored by Aurel's avatar Aurel

cell can acquire getBaobabVariationText from line if there is only one cell


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7468 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 39fc4307
...@@ -137,8 +137,12 @@ class CashDeliveryCell(BaobabMixin, DeliveryCell): ...@@ -137,8 +137,12 @@ class CashDeliveryCell(BaobabMixin, DeliveryCell):
""" """
script = self._getTypeBasedMethod('getBaobabSourceVariationText') script = self._getTypeBasedMethod('getBaobabSourceVariationText')
if script is not None: if script is not None:
return script(self) return script(self)
return self.getVariationText() if self.getVariationText() != self.aq_parent.getVariationText():
return self.getVariationText()
else:
# only one cell in a line
return self.aq_parent.getBaobabSourceVariationText()
security.declareProtected(Permissions.View, 'getBaobabDestinationVariationText') security.declareProtected(Permissions.View, 'getBaobabDestinationVariationText')
def getBaobabDestinationVariationText(self, **kw): def getBaobabDestinationVariationText(self, **kw):
...@@ -146,5 +150,9 @@ class CashDeliveryCell(BaobabMixin, DeliveryCell): ...@@ -146,5 +150,9 @@ class CashDeliveryCell(BaobabMixin, DeliveryCell):
""" """
script = self._getTypeBasedMethod('getBaobabDestinationVariationText') script = self._getTypeBasedMethod('getBaobabDestinationVariationText')
if script is not None: if script is not None:
return script(self) return script(self)
return self.getVariationText() if self.getVariationText() != self.aq_parent.getVariationText():
return self.getVariationText()
else:
# only one cell in a line
return self.aq_parent.getBaobabDestinationVariationText()
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