I think you can work around the allowable type checks. Not positive this works, but give something like this a try:
pt = getToolByName(portal, 'portal_types') type_info = pt.getTypeInfo('MyPortalType') ob = type_info._constructInstance(portal, id) On Thu, Dec 1, 2011 at 9:47 AM, Maarten Nieber <maar...@usecm.com> wrote: > Hi, > > in my test, I would like to temporarily enable Global Allow for my content > type, > so that I can directly instantiate it with invokeFactory (otherwise, I > would > have to first instantiate a whole bunch of other content types that are > unrelated to my test). > > In the pdb debugger, I can get access to getSite()['portal_types'], and I > assume > that somewhere inside this object I can change the Global Allow setting > for my > content type. > > Does anyone know where I should look further? > > Thanks! > Maarten > > > _______________________________________________ > Product-Developers mailing list > product-develop...@lists.plone.org > https://lists.plone.org/mailman/listinfo/plone-product-developers >
_______________________________________________ Product-Developers mailing list product-develop...@lists.plone.org https://lists.plone.org/mailman/listinfo/plone-product-developers