From 1ae2c8db9ab52b3d9ffc98fa7778adf724211dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Mon, 12 Dec 2005 08:13:44 +0000 Subject: [PATCH] make include of subcategories recusirve git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4592 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index 8356a547cf..c6719a3500 100755 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -640,18 +640,14 @@ class CategoryTemplateItem(ObjectTemplateItem): def build_sub_objects(self, context, id_list, url, **kw): p = context.getPortalObject() - sub_list = {} for id in id_list: relative_url = '/'.join([url,id]) object = p.unrestrictedTraverse(relative_url) object_copy = object._getCopy(context) - include_sub_categories = object.getProperty('business_template_include_sub_categories', 0) id_list = object_copy.objectIds() - if len(id_list) > 0 and include_sub_categories: + if len(id_list) > 0: self.build_sub_objects(context, id_list, relative_url) object_copy.manage_delObjects(list(id_list)) - else: - object_copy.manage_delObjects(list(id_list)) if hasattr(object, '__ac_local_roles__'): # remove local roles object.__ac_local_roles__ = None @@ -661,8 +657,6 @@ class CategoryTemplateItem(ObjectTemplateItem): object_copy.uid = None self._objects[relative_url] = object_copy object.wl_clearLocks() - return sub_list - def build(self, context, **kw): BaseTemplateItem.build(self, context, **kw) @@ -687,7 +681,6 @@ class CategoryTemplateItem(ObjectTemplateItem): self._objects[relative_url] = object_copy object.wl_clearLocks() - def install(self, context, light_install = 0, **kw): if (getattr(self, 'template_format_version', 0)) == 1: if light_install==0: -- 2.30.9