[Erp5-dev] Monkey Patching problem
Romain Courteaud
romain at nexedi.com
Tue Sep 4 16:41:21 CEST 2007
* ??ukasz Nowak [2007-09-04 16:06:31 +0200]:
> So... shall I do from Products.ERP5Type.Document.Resource import
> Resource? It is not working (ImportError: No module named Resource). So
> clue is in "but this is only after ERP5Type is initialized." - how
> wait/hook into it? Any code snippet to achieve it?
So, in this case, you have to use portal_classes to surcharge the
Document like this:
from Products.ERP5Type.Document.Resource import Resource as ERP5Resource
class Resource(ERP5Resource):
def foo(...)
Regards,
Romain
More information about the Erp5-dev
mailing list