From b24a4bbba484c305fb6be49268f0bb3012652e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Mon, 6 Jul 2009 10:46:48 +0000 Subject: [PATCH] - implement isCompleted for BPM related Simulation Movement git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27969 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/SimulationMovement.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/product/ERP5/Document/SimulationMovement.py b/product/ERP5/Document/SimulationMovement.py index 2a1343206e..88e15449b4 100644 --- a/product/ERP5/Document/SimulationMovement.py +++ b/product/ERP5/Document/SimulationMovement.py @@ -188,6 +188,14 @@ class SimulationMovement(Movement): # nothing better to return. return self.getSimulationState() + security.declareProtected(Permissions.AccessContentsInformation, + 'isCompleted') + def isCompleted(self): + """Zope publisher docstring. Documentation in ISimulationMovement""" + # only available in BPM, so fail totally in case of working without BPM + return self.getSimulationState() in self.getCausalityValue( + portal_type='Business Path').getCompletedStateList() + security.declareProtected( Permissions.AccessContentsInformation, 'isAccountable') def isAccountable(self): -- 2.30.9