From 121a94ef220434d61f6e39d148c1fe6be9e01bc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Thu, 1 Mar 2007 15:01:27 +0000
Subject: [PATCH] fix way to call clearAllCache

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13152 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/BusinessTemplate.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index f43c0eb542..63c0c2dd08 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -56,7 +56,6 @@ from Products.ERP5Type.XMLObject import XMLObject
 from Products.ERP5Type.RoleInformation import RoleInformation
 import fnmatch
 import re, os, sys, string, tarfile
-from Products.ERP5Type.Cache import clearAllCache
 from DateTime import DateTime
 from OFS.Traversable import NotFound
 from OFS import XMLExportImport
@@ -4161,7 +4160,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
 
       # It is better to clear cache because the installation of a template
       # adds many new things into the portal.
-      clearAllCache()
+      self.getPortalObject().portal_caches.clearAllCache()
 
     security.declareProtected(Permissions.ManagePortal, 'install')
     def install(self, **kw):
@@ -4217,7 +4216,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
           item.uninstall(local_configuration)
       # It is better to clear cache because the uninstallation of a
       # template deletes many things from the portal.
-      clearAllCache()
+      self.getPortalObject().portal_caches.clearAllCache()
 
     uninstall = WorkflowMethod(uninstall)
 
-- 
2.30.9