[CPS-devel] Re: context not available in read expression forcreation of documents

Yves Bastide ybastide at wanadoo.fr
Thu Jun 15 16:17:39 CEST 2006


JoseLuis de la Rosa Triviño wrote:
> I modified the expression to 
> 
> {{{python:portal.portal_directories.members[context.aq_parent.getId()].center}}} 

At document creation, context aka object is None

AFAIK you can't get your object's container from a field expression 
(since the document doesn't exist yet); either change your document's 
workflow (adding a script after the create transition), or register an 
event handler (there's an example I think on Florent's blog)



More information about the cps-devel mailing list

This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.