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

if a simulation movment has been explicitly marked as frozen, use this and not...

if a simulation movment has been explicitly marked as frozen, use this and not the info from business process


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45812 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6f19dd73
...@@ -226,6 +226,8 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -226,6 +226,8 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
"""Lookup business path and, if any, return True whenever """Lookup business path and, if any, return True whenever
simulation_state is in one of the frozen states defined on business path simulation_state is in one of the frozen states defined on business path
""" """
if self._baseGetFrozen():
return True
business_link = self.getCausalityValue( business_link = self.getCausalityValue(
portal_type=self.getPortalBusinessLinkTypeList()) portal_type=self.getPortalBusinessLinkTypeList())
if business_link is None: if business_link is None:
...@@ -235,7 +237,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -235,7 +237,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
return True return True
if self._baseIsFrozen() == 0: if self._baseIsFrozen() == 0:
self._baseSetFrozen(None) self._baseSetFrozen(None)
return self._baseGetFrozen() or False return False
return self.getSimulationState() in business_link.getFrozenStateList() return self.getSimulationState() in business_link.getFrozenStateList()
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
......
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