diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index 5b394a6fe1f265b47533245f412a5f6c36fabde6..bf485018780ef780992a13f3e8cd6ac7959d8695 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)