From dc39ddf0281ddd5aa8cd3dc79e85dd1d5c4b5437 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Pin?= Date: Fri, 1 Apr 2011 13:13:56 +0200 Subject: [PATCH] =?utf8?q?Un=20identificateur=20unique=20est=20automatique?= =?utf8?q?ment=20donn=C3=A9=20=C3=A0=20la=20cr=C3=A9ation=20d'un=20objet.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/control/add_content.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skins/control/add_content.py b/skins/control/add_content.py index c168112..d893f60 100644 --- a/skins/control/add_content.py +++ b/skins/control/add_content.py @@ -1,6 +1,8 @@ ##parameters= from Products.Plinn.utils import makeValidId form = context.REQUEST.form +from Products.CMFCore.utils import getToolByName +handler = getToolByName(context, 'portal_uidhandler') for k in form.keys() : item = form[k] @@ -15,6 +17,8 @@ if typeDic.has_key('id') : context.invokeFactory( typeDic['type'], newid, title=title) newOb = getattr(context, newid) + handler = getToolByName(context, 'portal_uidhandler') + handler.register(newOb) ti = newOb.getTypeInfo() immediate_view = ti.immediate_view -- 2.20.1