Commit 73c3d972 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add getAggregateReference


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5833 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 202372cb
...@@ -61,6 +61,15 @@ class BankingOperation(BaobabMixin, AccountingTransaction): ...@@ -61,6 +61,15 @@ class BankingOperation(BaobabMixin, AccountingTransaction):
, PropertySheet.Amount , PropertySheet.Amount
) )
security.declareProtected(Permissions.View, 'getAggregateReference')
def getAggregateReference(self, **kw):
"""Return the reference of an aggregate value.
"""
value = self.getAggregateValue()
if value is not None:
return value.getReference()
### Dynamic patch ### Dynamic patch
Delivery.getBaobabSourceUid = lambda x: x.getSourceUid() Delivery.getBaobabSourceUid = lambda x: x.getSourceUid()
Delivery.getBaobabSourceUid__roles__ = PermissionRole(Permissions.View) Delivery.getBaobabSourceUid__roles__ = PermissionRole(Permissions.View)
......
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