Commit e8195b94 authored by Sebastien Robin's avatar Sebastien Robin

we must not assume that we always have the getSimulationState method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2949 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6a869c37
......@@ -107,9 +107,11 @@ class OrderLine(DeliveryLine):
(Called when the object is created or moved.)
"""
DeliveryLine.manage_afterAdd(self, item, container)
if self.aq_parent.getSimulationState() not in self.getPortalDraftOrderStateList():
# Only reexpand order rule when we add lines
self.aq_parent.activate()._createOrderRule()
# Make sure we have a workflow with the variable name 'simulation_state'
if getattr(self.getParent(),'getSimulationState'):
if self.getParent().getSimulationState() not in self.getPortalDraftOrderStateList():
# Only reexpand order rule when we add lines
self.aq_parent.activate()._createOrderRule()
# Simulation Consistency Check
def getSimulationQuantity(self):
......
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