From 4d592eb5efa6e2198a54ad14decb1793e17f0eb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 7 Jul 2005 12:39:32 +0000
Subject: [PATCH] fix uninstallation of BT with custom actions

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

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index 5b394a6fe1..bf48501878 100755
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -624,7 +624,7 @@ class ActionTemplateItem(BaseTemplateItem):
       object = p.unrestrictedTraverse(relative_url)
       action_list = object.listActions()
       for index in range(len(action_list)):
-        if getattr(ai, key) == value:
+        if getattr(action_list[index], key) == value:
           object.deleteActions(selections=(index,))
           break
     BaseTemplateItem.uninstall(self, context, **kw)
-- 
2.30.9