From 42d188133f4b80761db27ecf4576c5771476e265 Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Tue, 8 Jun 2004 17:44:04 +0000 Subject: [PATCH] Add getSimulationState. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@974 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/Coramy/Document/Invoice.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/product/Coramy/Document/Invoice.py b/product/Coramy/Document/Invoice.py index 7715aae15f..f9c684033d 100755 --- a/product/Coramy/Document/Invoice.py +++ b/product/Coramy/Document/Invoice.py @@ -120,4 +120,12 @@ une commande...""" ) } + security.declareProtected(Permissions.AccessContentsInformation, 'getSimulationState') + def getSimulationState(self, id_only=1): + """ + Returns the current state in simulation + """ + portal_workflow = getToolByName(self, 'portal_workflow') + wf = portal_workflow.getWorkflowById('sale_invoice_transaction_workflow') + return wf._getWorkflowStateOf(self, id_only=id_only ) -- 2.30.9