6 Dec
2004
6 Dec
'04
7:30 a.m.
Yes, that's true, but I think you can make it work if you pass the REQUEST (or I think the object itself) that calls the init method. ie:
def manage_addMyProduct(self, p1, p2, ..., REQUEST=None, submit=None): """Method that is called to create an instance on the zope db""" #Do something here #Then create the object: myObj=MyProduct(self,p1,p2) self._setObject(id,boringObj)
#Do request redirection things here
class MyProduct: def __init__(self, callerObj, p1, p2): """Inits your product""" ppt=getToolByName(callerObj,"parasynpip_tool")
That looks like a nasty workaround for something that you really should be doing in manage_afterAdd. jens