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

simplify code


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44229 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 48c287a5
......@@ -593,7 +593,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
'isBuildable')
def isBuildable(self):
"""Simulation Movement buildable logic"""
if self.getDeliveryValue() is not None:
if self.getDelivery():
# already delivered
return False
......@@ -815,7 +815,6 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
else:
return quantity - profit_quantity + delivery_error
return mapping.getMappedProperty(self, property)
else:
return self.getProperty(property)
security.declareProtected(Permissions.ModifyPortalContent,
......@@ -824,5 +823,4 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
mapping = self.getPropertyMappingValue()
if mapping is not None:
return mapping.setMappedProperty(self, property, value)
else:
return self.setProperty(property, value)
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