Commit edc0e3b9 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Minor changes made during code review and rewrite.

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@35566 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d487196a
......@@ -65,6 +65,16 @@ class IBusinessPathProcess(Interface):
business_path -- a Business Path document
"""
def isBusinessPathPartiallyCompleted(explanation, business_path):
"""Returns True if given Business Path document
is partially completed in the context of provided explanation.
explanation -- an Order, Order Line, Delivery or Delivery Line which
implicitely defines a simulation subtree
business_path -- a Business Path document
"""
def getExpectedBusinessPathCompletionDate(explanation, business_path,
delay_mode=None):
"""Returns the expected completion date of given Business Path document
......@@ -369,7 +379,7 @@ class IBusinessProcess(IBusinessPathProcess, IBuildableBusinessPathProcess,
build process of a complex simulation process in ERP5.
"""
def isBusinessProcessCompleted(explanation):
def isCompleted(explanation):
"""Returns True is all applicable Trade States and Trade Phases
are completed in the context of given explanation.
......@@ -377,6 +387,22 @@ class IBusinessProcess(IBusinessPathProcess, IBuildableBusinessPathProcess,
implicitely defines a simulation subtree
"""
def isBuildable(explanation):
"""Returns True is one Business Path of this Business Process
is buildable in the context of given explanation.
explanation -- an Order, Order Line, Delivery or Delivery Line which
implicitely defines a simulation subtree
"""
def isPartiallyBuildable(explanation):
"""Returns True is one Business Path of this Business Process
is partially buildable in the context of given explanation.
explanation -- an Order, Order Line, Delivery or Delivery Line which
implicitely defines a simulation subtree
"""
def getExpectedCompletionDate(explanation, delay_mode=None):
"""Returns the expected date at which all applicable Trade States and
Trade Phases are completed in the context of given explanation.
......@@ -384,3 +410,14 @@ class IBusinessProcess(IBusinessPathProcess, IBuildableBusinessPathProcess,
explanation -- an Order, Order Line, Delivery or Delivery Line which
implicitely defines a simulation subtree
"""
def build(explanation, include_partially_buildable=False):
"""Build whatever is buildable in the context of given explanation.
explanation -- an Order, Order Line, Delivery or Delivery Line which
implicitely defines a simulation subtree
include_partially_buildable -- if set to True, also build partially
buildable business path. Else
only build strictly buildable path.
"""
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