Commit 3aabc268 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_core: add get default asset price method

parent 9e370a19
......@@ -513,6 +513,11 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
return type_based_script()
return self._getAssetPrice(section = self.getDestinationSectionValue(), date = self.getStopDate())
security.declareProtected( Permissions.AccessContentsInformation,
'getDefaultDestinationAssetPrice')
def getDefaultDestinationAssetPrice(self):
return self._getAssetPrice(section = self.getDestinationSectionValue(), date = self.getStopDate())
def _getAssetPrice(self,section,date):
price = self.getPrice()
if section is None or not price or getattr(
......
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