Il 24/05/2011 08:41, Raphael Ritz ha scritto:
On 5/12/11 12:12 PM, Yuri wrote:
Preface: I'm tryng to access an object via a browser view, the object
normally is not accessible by the user.

What I did:

abstracts =
self.portal_catalog.unrestrictedSearchResults(sessions=self.this_session)
results = []
for abs in abstracts:
obj = self.context.unrestrictedTraverse(abs.getPath())
abs_data = {'title': abs.Title, 'abstract': obj.getAbstract(), 'autori':
obj.autori_view(), 'url':obj.absolute_url(), 'posteroral':
obj.getAbstract_type()}

this works.

What about the workflow status?

status_info =
wftool.getStatusOf("rivista_elettronica_publication_workflow", obj)
status_id = status_info['review_state'] <- error

What happens if you do

wftool.getInfoFor(obj, 'review_state')

It did not worked, simply because the catalog search returned unwanted objects. So it was a mistake by me.
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to