From 91d2cc6ed1a281e5f7f986462953ca78633adfb8 Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Mon, 16 Nov 2009 10:09:56 +0000 Subject: [PATCH] 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 --- product/ERP5/Document/SimulationMovement.py | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/product/ERP5/Document/SimulationMovement.py b/product/ERP5/Document/SimulationMovement.py index 7863ff6b75..0e1b19a40e 100644 --- a/product/ERP5/Document/SimulationMovement.py +++ b/product/ERP5/Document/SimulationMovement.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. @@ -120,6 +121,9 @@ class SimulationMovement(Movement, PropertyRecordableMixin): , PropertySheet.Reference ) + # Declarative interfaces + zope.interface.implements(interfaces.IPropertyRecordable, ) + def tpValues(self) : """ show the content in the left pane of the ZMI """ return self.objectValues() @@ -450,6 +454,11 @@ class SimulationMovement(Movement, PropertyRecordableMixin): """ Returns the quantity property deducted by the possible profit_quantity and 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() profit_quantity = self.getProfitQuantity() or 0 @@ -612,3 +621,42 @@ class SimulationMovement(Movement, PropertyRecordableMixin): return True 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 -- 2.30.9