Commit 1ca536f1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

implement FILO delivery solver based on FIFO delivery solver.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30434 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 84ba6558
......@@ -27,11 +27,26 @@
#
##############################################################################
import zope.interface
from Products.ERP5Type import interfaces
from DeliverySolver import DeliverySolver
from FIFO import FIFO
class FILO(DeliverySolver):
class FILO(FIFO):
"""
The FILO solver reduces deliveted quantity by reducing the quantity of simulation movements from the first order.
The FILO solver reduces deliveted quantity by reducing the quantity of
simulation movements from the first order.
"""
# Declarative interfaces
zope.interface.implements(interfaces.IDeliverySolver)
def _getSimulationMovementList(self):
"""
Returns a list of simulation movement sorted from the first order.
"""
simulation_movement_list = self.simulation_movement_list[:]
if len(simulation_movement_list):
simulation_movement_list.sort(
key=lambda x:x.getExplainationValue().getStartDate())
return simulation_movement_list
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