Commit 76504c3a authored by Romain Courteaud's avatar Romain Courteaud

Remove solve method.

Add new method from Simulation API.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3150 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7935f17f
...@@ -248,7 +248,7 @@ a service in a public administration).""" ...@@ -248,7 +248,7 @@ a service in a public administration)."""
be expanded. be expanded.
""" """
#LOG('In simulation expand',0, str(self.id)) #LOG('In simulation expand',0, str(self.id))
self.reindexObject() # self.reindexObject()
if self.getCausalityState() is 'expanded': if self.getCausalityState() is 'expanded':
# Reexpand # Reexpand
for my_applied_rule in self.objectValues(): for my_applied_rule in self.objectValues():
...@@ -269,21 +269,22 @@ a service in a public administration).""" ...@@ -269,21 +269,22 @@ a service in a public administration)."""
#expand = WorkflowMethod(expand) USELESS NOW #expand = WorkflowMethod(expand) USELESS NOW
security.declareProtected(Permissions.ModifyPortalContent, 'solve') # XXX moved to Portal Simulation
def solve(self, solver, new_target=None): # security.declareProtected(Permissions.ModifyPortalContent, 'solve')
""" # def solve(self, solver, new_target=None):
Makes the movement expandable again # """
# Makes the movement expandable again
-> new status -> solved #
# -> new status -> solved
Once a movement has been updated with consistent #
target and planned values, it is marked as solved # Once a movement has been updated with consistent
and can therefore be expanded again # target and planned values, it is marked as solved
""" # and can therefore be expanded again
self.portal_simulation.applyTargetSolver(self, solver, new_target=new_target) # """
self.setCausalityState('solved') # self.portal_simulation.applyTargetSolver(self, solver, new_target=new_target)
# self.setCausalityState('solved')
#solve = WorkflowMethod(solve) USELESS NOW #
# #solve = WorkflowMethod(solve) USELESS NOW
security.declareProtected(Permissions.ModifyPortalContent, 'diverge') security.declareProtected(Permissions.ModifyPortalContent, 'diverge')
def diverge(self): def diverge(self):
...@@ -454,6 +455,42 @@ a service in a public administration).""" ...@@ -454,6 +455,42 @@ a service in a public administration)."""
if order_value is not None: if order_value is not None:
return order_value.getStopDate() return order_value.getStopDate()
security.declareProtected(Permissions.AccessContentsInformation,
'getDeliveryStartDateList')
def getDeliveryStartDateList(self):
"""
Returns the stop date of related delivery(s)
"""
start_date_list = []
delivery_movement = self.getDeliveryValue()
if delivery_movement is not None:
start_date_list.append(delivery_movement.getStartDate())
return start_date_list
security.declareProtected(Permissions.AccessContentsInformation,
'getDeliveryStopDateList')
def getDeliveryStopDateList(self):
"""
Returns the stop date of related delivery(s)
"""
stop_date_list = []
delivery_movement = self.getDeliveryValue()
if delivery_movement is not None:
stop_date_list.append(delivery_movement.getStopDate())
return stop_date_list
security.declareProtected(Permissions.AccessContentsInformation,
'getDeliveryQuantity')
def getDeliveryQuantity(self):
"""
Returns the quantity of related delivery(s)
"""
quantity = None
delivery_movement = self.getDeliveryValue()
if delivery_movement is not None:
quantity = delivery_movement.getQuantity()
return quantity
security.declareProtected(Permissions.AccessContentsInformation, 'isConvergent') security.declareProtected(Permissions.AccessContentsInformation, 'isConvergent')
def isConvergent(self): def isConvergent(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