projects
/
Plinn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ab16722
)
Un identificateur unique est automatiquement donné à la création d'un objet.
author
Benoît Pin
<pin@cri.ensmp.fr>
Fri, 1 Apr 2011 11:13:56 +0000
(13:13 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Fri, 1 Apr 2011 11:13:56 +0000
(13:13 +0200)
skins/control/add_content.py
patch
|
blob
|
history
diff --git
a/skins/control/add_content.py
b/skins/control/add_content.py
index
c168112
..
d893f60
100644
(file)
--- 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
##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]
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)
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
ti = newOb.getTypeInfo()
immediate_view = ti.immediate_view