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

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to