I'm trying to solve a problem that I'm having when I use a custom checkout
workflow that does not use workflow state names that are part of the object
types workflow policy. For example, if Documents use the
simple_publishing_workflow and my checkout_work has states checked_out and
awaiting_checkin (for simplicity) the folder content view will not be able
to properly determine the title of the checked_out review state because
checked_out is not a state of the simple_publishing_workflow.
What I am struggling with is getting the current workflow policy for the
object itself. When I call wf_tool.getChainFor(obj) it returns an empty
list.
97 objtype_chain =
self.tools.workflow().getChainForPortalType(obj_type)
98 obj_chain = self.tools.workflow().getChainFor(obj)
99 import pdb; pdb.set_trace();
100
101 -> modified = plone_view.toLocalizedTime(
102 obj.ModificationDate, long_format=1)
103
104 if obj_type in use_view_action:
105 view_url = url + '/view'
106 elif obj.is_folderish:
(Pdb) !objtype_chain
('simple_publication_workflow',)
(Pdb) !obj_chain
()
Any ideas? I can use a work around to title-ize the state name, but this
problem also doesn't allow me to have a custom workflow variable.
Thanks,
Mike
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers