diff --git a/product/ERP5/Document/QuantitySplitSolver.py b/product/ERP5/Document/QuantitySplitSolver.py index 490d114598547e85934c80fca71a02cba1d3a024..2942af5849282fb59391f764ef803931cedc0a9f 100644 --- a/product/ERP5/Document/QuantitySplitSolver.py +++ b/product/ERP5/Document/QuantitySplitSolver.py @@ -68,7 +68,9 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject): for delivery_line in self.getDeliveryValueList(): decision_quantity = delivery_line.getQuantity() simulation_movement_list = delivery_line.getDeliveryRelatedValueList() - delivery_solver = self.portal_solvers.newDeliverySolver(self.getDeliverySolver(), simulation_movement_list) + configuration_dict = self.getConfigurationPropertyDict() + delivery_solver = self.portal_solvers.newDeliverySolver( + configuration_dict['delivery_solver'], simulation_movement_list) # Update the quantity using delivery solver algorithm split_list = delivery_solver.setTotalQuantity(decision_quantity) # Create split movements @@ -77,5 +79,5 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject): batch_mode=True) # Copy at same level new_movement._setDelivery(None) new_movement._setQuantity(split_quantity) - new_movement._setStartDate(self.getStartDate()) - new_movement._setStopDate(self.getStopDate()) + new_movement._setStartDate(configuration_dict['start_date']) + new_movement._setStopDate(configuration_dict['stop_date']) diff --git a/product/ERP5/PropertySheet/TargetSolver.py b/product/ERP5/PropertySheet/TargetSolver.py index c498a26ff8cd7de28192150cb1ed27df94dbf193..046e2f12e9bad62013b83e9120148a793206ef13 100644 --- a/product/ERP5/PropertySheet/TargetSolver.py +++ b/product/ERP5/PropertySheet/TargetSolver.py @@ -30,24 +30,4 @@ from Products.CMFCore.Expression import Expression class TargetSolver: - _properties = ( - { 'id': 'delivery_solver', - 'type': 'string', - 'mode': 'w', - 'label': 'Delivery Solver' - }, - { 'id': 'start_date', - 'description':'The date when a new movement starts', - 'type': 'date', - 'mode': 'w', - 'label': 'Start Date' - }, - { 'id': 'stop_date', - 'description':'The date when a new movement stops', - 'type': 'date', - 'mode': 'w', - 'label': 'Stop Date' - }, - ) - _categories = ('delivery',)