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,8 +815,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
else:
return quantity - profit_quantity + delivery_error
return mapping.getMappedProperty(self, property)
else:
return self.getProperty(property)
return self.getProperty(property)
security.declareProtected(Permissions.ModifyPortalContent,
'setMappedProperty')
......@@ -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)
return self.setProperty(property, value)
......@@ -206,4 +206,4 @@ class SubscriptionItem(Item, MovementGeneratorMixin, PeriodicityMixin):
id_index += 1
# And now return result
return result
\ No newline at end of file
return result
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