From 098887b859e2786b817ae527beaa30b6cb661f48 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Wed, 24 Oct 2007 16:19:38 +0000
Subject: [PATCH] Get storage and stats on selection without acquisition
 context

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17175 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/SelectionTool.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Form/SelectionTool.py b/product/ERP5Form/SelectionTool.py
index 1ea211f225..d6607b210a 100644
--- a/product/ERP5Form/SelectionTool.py
+++ b/product/ERP5Form/SelectionTool.py
@@ -116,7 +116,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
     def getStorage(self, default=None):
       if default is None:
         default = self.storage_list[0]
-      storage = getattr(self, 'storage', default)
+      storage = getattr(aq_base(self), 'storage', default)
       if storage is not default and storage not in self.storage_list:
         storage = self.storage_list[0]
       return storage
@@ -495,7 +495,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
         default_stats = [' '] * 6
       selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
       if selection is not None:
-        return getattr(selection, 'stats', default_stats)
+        return getattr(aq_base(selection), 'stats', default_stats)
       return default_stats
 
 
-- 
2.30.9