[Zope-CMF] Additional property to portal_type

Yuppie schubbe@web.de
Sun, 04 Aug 2002 17:21:38 +0200


> 	# Add a document number property
> 	product.manage_addProperty( 'docNumber', '', 'string' )
> 
> The problem is that I can now only add MyFile content type only once.
> The second time I get an error 
> 
> 	Error Type: Bad Request
> 	Error Value: Invalid or duplicate property id
> 
> The offending line is the product.manage_addProperty( 'docNumber', '', 'string' )
> and so I guess I'm missing something either in application or implementation.
> 
> What did I do wrong?

You want to create a property of your new item, not of product:

     # Add a document number property
     item.manage_addProperty( 'docNumber', '', 'string' )


Yuppie