Commit be5a4588 authored by Jérome Perrin's avatar Jérome Perrin

Add back a getSimulationQuantity method, because it is used in some forms

parent 37129c23
......@@ -591,6 +591,13 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
return simulation_movement is not None and \
not simulation_movement.getParentValue().isRootAppliedRule()
security.declareProtected(Permissions.AccessContentsInformation,
'getSimulationQuantity')
def getSimulationQuantity(self):
"""Computes the quantities in the simulation.
"""
return sum(m.getQuantity() for m in self.getDeliveryRelatedValueList())
# Debit and credit methods
security.declareProtected( Permissions.AccessContentsInformation,
'getSourceDebit')
......
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