Commit 406130aa authored by Aurel's avatar Aurel

don't export subobjects of path if * not specify


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4481 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a8112b94
......@@ -615,6 +615,7 @@ class PathTemplateItem(ObjectTemplateItem):
for relative_url in self._resolvePath(p, [], path.split('/')):
object = p.unrestrictedTraverse(relative_url)
object = object._getCopy(context)
id_list = object.objectIds()
if hasattr(object, '__ac_local_roles__'):
# remove local roles
object.__ac_local_roles__ = None
......@@ -622,6 +623,13 @@ class PathTemplateItem(ObjectTemplateItem):
object._owner = None
if hasattr(object, 'uid'):
object.uid = None
if hasattr(object, 'groups'):
# we must keep groups because it's ereased when we delete subobjects
groups = deepcopy(object.groups)
if len(id_list) > 0:
object.manage_delObjects(list(id_list))
if hasattr(object, 'groups'):
object.groups = groups
self._objects[relative_url] = object
object.wl_clearLocks()
......@@ -2314,6 +2322,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
for item_name in self._item_name_list:
item = getattr(self, item_name)
if item is not None:
LOG('install item type', 0, item_name)
item.install(local_configuration)
# It is better to clear cache because the installation of a template
# adds many new things into the portal.
......
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