diff --git a/product/ERP5/interfaces/business_process.py b/product/ERP5/interfaces/business_process.py index d5a45b667cb97d74565f74416f1bd848c02995d6..9e8c7dfd45a859f169330012ca3da5131fb3ebed 100644 --- a/product/ERP5/interfaces/business_process.py +++ b/product/ERP5/interfaces/business_process.py @@ -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. + """