Commit 91d2cc6e authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added method place holders. Added interface declaration. Added comments to...

Added method place holders. Added interface declaration. Added comments to explain why getCorrectedQuantity based on profit quantity is not good.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30653 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b0f96c4
# -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -120,6 +121,9 @@ class SimulationMovement(Movement, PropertyRecordableMixin): ...@@ -120,6 +121,9 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
, PropertySheet.Reference , PropertySheet.Reference
) )
# Declarative interfaces
zope.interface.implements(interfaces.IPropertyRecordable, )
def tpValues(self) : def tpValues(self) :
""" show the content in the left pane of the ZMI """ """ show the content in the left pane of the ZMI """
return self.objectValues() return self.objectValues()
...@@ -450,6 +454,11 @@ class SimulationMovement(Movement, PropertyRecordableMixin): ...@@ -450,6 +454,11 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
""" """
Returns the quantity property deducted by the possible profit_quantity and Returns the quantity property deducted by the possible profit_quantity and
taking into account delivery error taking into account delivery error
NOTE: XXX-JPS This method should not use profit_quantity. Profit and loss
quantities are now only handled through explicit movements.
Look are invocations of _isProfitAndLossMovement in
ERP5.mixin.rule to understand how.
""" """
quantity = self.getQuantity() quantity = self.getQuantity()
profit_quantity = self.getProfitQuantity() or 0 profit_quantity = self.getProfitQuantity() or 0
...@@ -612,3 +621,42 @@ class SimulationMovement(Movement, PropertyRecordableMixin): ...@@ -612,3 +621,42 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
return True return True
return False return False
return False return False
def getSolverProcessValueList(self, movement=None, validation_state=None):
"""
Returns the list of solver processes which are
are in a given state and which apply to delivery_or_movement.
This method is useful to find applicable solver processes
for a delivery.
movement -- not applicable
validation_state -- a state of a list of states
to filter the result
"""
raise NotImplementedError
def getSolverDecisionValueList(self, movement=None, validation_state=None):
"""
Returns the list of solver decisions which apply
to a given movement.
movement -- not applicable
validation_state -- a state of a list of states
to filter the result
"""
raise NotImplementedError
def getSolvedPropertyApplicationValueList(self, movement=None, divergence_tester=None):
"""
Returns the list of documents at which a given divergence resolution
can be resolved at. For example, in most cases, date divergences can
only be resolved at delivery level whereas quantities are usually
resolved at cell level.
The result of this method is a list of ERP5 documents.
movement -- not applicable
"""
raise NotImplementedError
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