Commit 403f72d1 authored by Romain Courteaud's avatar Romain Courteaud

Remove builDeliveryList which is not used anymore.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2993 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 78951be6
......@@ -107,59 +107,10 @@ class Order(Delivery):
# We are now certain we have a single applied rule
# It is time to expand it
LOG('Order._createOrderRule,my_applied_rule.getPhysicalPath()',0, \
my_applied_rule.getPhysicalPath())
# LOG('Order._createOrderRule,my_applied_rule.getPhysicalPath()',0, \
# my_applied_rule.getPhysicalPath())
self.activate().expand(my_applied_rule.getId())
security.declareProtected(Permissions.ModifyPortalContent, \
'buildDeliveryList')
def buildDeliveryList(self):
# Make sure there is exactly one applied rule
my_applied_rule_list = self.getCausalityRelatedValueList( \
portal_type='Applied Rule')
if len(my_applied_rule_list)==0:
# Make sure we have an order rule
self._createOrderRule()
my_applied_rule_list = self.getCausalityRelatedValueList( \
portal_type='Applied Rule')
elif len(my_applied_rule_list)>1:
raise SimulationError, 'Order %s has more than one applied rule.' %\
self.getRelativeUrl()
applied_rule = my_applied_rule_list[0].getObject()
if applied_rule is None:
# XXX This is an error
raise SimulationError, "Order %s has None order rule" %\
self.getRelativeUrl()
# Make sure applied rule has been reindexed
applied_rule.immediateReindexObject()
# Make sure there are no more activities on this order related to expand
# XXX do not use flushActivity anymore ! So, call expand to be sure...
# self.flushActivity(invoke=0, method_id='expand')
# Make sure expand is finished
# We are expanding but are not allowed to if state wrong...
# (ex. confirmed)
# applied_rule.expand(force = 1)
applied_rule.expand()
# thus, we mist force expand of applied order rule
# applied_rule.flushActivity(invoke=1)
# Make sure applied rule has been reindexed
applied_rule.recursiveImmediateReindexObject()
# # Build delivery list on applied rule
# # Currently, we build it 'again' but we should actually only build
# # deliveries for orphaned movements
# if self.getPortalType() == 'Production Order' :
# delivery_list = self.ProductionOrder_buildDeliveryList()
# # Coramy specific moved to portal_simulation
# #else:
# elif self.getPortalType() in ('Purchase Order', 'Sale Order') :
# delivery_list = self.Order_createPackingList()
# # Coramy specific should be moved to portal_simulation
# #self.informDeliveryList(delivery_list=delivery_list,
# # comment=repr(delivery_list)) # XXX Not ready
def applyToOrderRelatedMovement(self, portal_type='Simulation Movement', \
method_id = 'expand'):
"""
......
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