diff --git a/product/ERP5/Document/BusinessProcess.py b/product/ERP5/Document/BusinessProcess.py index e3ad02b798b40d0dc0f71674cd1c86bdf622d4f9..9cd03f0751d6ab57e781c0c6de8068b3163079a2 100644 --- a/product/ERP5/Document/BusinessProcess.py +++ b/product/ERP5/Document/BusinessProcess.py @@ -104,15 +104,16 @@ class BusinessProcess(Path, XMLObject): **kw parameters follows the API of searchValues / contentValues """ # Naive implementation to redo XXX - kw['portal_type'] = "Business State" - return self.contentValues(*args, **kw) + kw['portal_type'] = "Business Path" + return [x for x in [y.getSuccessorValue() for y in \ + self.contentValues(*args, **kw)] if x is not None] # Access to path and states of the business process def isCompleted(self, explanation): """ True if all states are completed """ - for state in self.getStateValueList(): + for path in self.getStateValueList(): if not state.isCompleted(explanation): return False return True diff --git a/product/ERP5/tests/testBPMCore.py b/product/ERP5/tests/testBPMCore.py index 3752490492cac12e59c30e452e8f4f011b3fb94a..a53103a2f3a7bcfd3e51ec85acf6bda7eee834c0 100644 --- a/product/ERP5/tests/testBPMCore.py +++ b/product/ERP5/tests/testBPMCore.py @@ -46,7 +46,6 @@ class TestBPMMixin(ERP5TypeTestCase): business_process_portal_type = 'Business Process' business_path_portal_type = 'Business Path' - business_state_portal_type = 'Business State' normal_resource_use_category_list = ['normal'] invoicing_resource_use_category_list = ['discount', 'tax']