Commit c1207a1e authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Movement: Optional Type Base Method for source and destination asset price

parent 770e005f
......@@ -484,6 +484,9 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
This will be implemeted by calling currency conversion on currency resources
"""
type_based_script = self._getTypeBasedMethod('getSourceAssetPrice')
if type_based_script:
return type_based_script(self)
return self.getPrice() # XXX Not implemented yet TODO
security.declareProtected( Permissions.AccessContentsInformation,
......@@ -492,6 +495,9 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
"""
Returns the price converted to the currency of the destination section
"""
type_based_script = self._getTypeBasedMethod('getDestinationAssetPrice')
if type_based_script:
return type_based_script(self)
return self.getPrice() # XXX Not implemented yet TODO
# Causality computation
......
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