Commit 1aecc505 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Back to the previous implementation, as the constraint in setDefaultActivateParameters was removed.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13783 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4d94d63b
...@@ -332,20 +332,10 @@ class DocumentConstructor(Method): ...@@ -332,20 +332,10 @@ class DocumentConstructor(Method):
def __call__(self, folder, id, REQUEST=None, def __call__(self, folder, id, REQUEST=None,
activate_kw=None, is_indexable=None, **kw): activate_kw=None, is_indexable=None, **kw):
o = self.klass(id) o = self.klass(id)
# Disable implicit indexing, because activate_kw may not be
# set correctly, as setDefaultActivateParameters depends on
# the physical path, until it is connected to an object tree.
o.isIndexable = 0
folder._setObject(id, o)
if is_indexable is not None:
o.isIndexable = is_indexable
else:
del o.isIndexable
o = folder._getOb(id)
if activate_kw is not None: if activate_kw is not None:
o.setDefaultActivateParameters(**activate_kw) o.setDefaultActivateParameters(**activate_kw)
# Now execute reindexObject explicitly. folder._setObject(id, o)
o.reindexObject() o = folder._getOb(id)
# if no activity tool, the object has already an uid # if no activity tool, the object has already an uid
if getattr(aq_base(o),' uid', None) is None: if getattr(aq_base(o),' uid', None) is None:
o.uid = folder.portal_catalog.newUid() o.uid = folder.portal_catalog.newUid()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment