4 Sep
2002
4 Sep
'02
7:14 p.m.
Gouzy Nicolas wrote:
You can try:
container.manage_addProduct['MyProduct'].MyProduct_add()
MyProduct_add is the constructor of the ZClass MyProduct
How do I pass the object id to this constructor? Seems that it reads it from the REQUEST, but I can't assign to REQUEST in a python script. This code: context.REQUEST['id'] = myObjectId container.manage_addProduct['MyProduct'].MyProduct_add() produces an error: Error Type: TypeError Error Value: object does not support item or slice assignment Am I missing something? --Borislav