[Zope] Re: review_state

julian jules12af at aol.com
Fri Jun 1 04:39:46 EDT 2007


Winterflood, Jonathan a écrit :
> Hi,
> In the case of a document proxy managed by CPSWorkflow, I use this:
> 
> review_state = proxy.getContentInfo()['review_state']
> 
> Is this your case?
> If this is not the right way to do it in my context, I'd of course appreciate your comments :)
> 
> Hope it helps,
> Jonathan

Thanks for your help :)

I have fund a good method :p

---------------------------------------------------
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.permissions import ManagePortal

query = {'portal_type' : 'Document',
         }

for prestataire in self.portal_catalog.searchResults(query):
       presta_obj = prestataire.getObject()
       wflow = getToolByName(presta_obj, "portal_workflow", None)
       if wflow is not None:
            review_state = wflow.getInfoFor(presta_obj, "review_state")
-----------------------------------------------------

So review_state = published or visible...

My problem is resolve :)

Julian



More information about the Zope mailing list