From 2ce2ca94581f990d04c0b993fc7089ec4bc2e842 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Wed, 10 Nov 2010 12:00:18 +0000
Subject: [PATCH] add an optional id argument so that Tools follow the same
 __init__ signature as other Documents in ERP5. If id is not given, behavior
 is unchanged.

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

diff --git a/product/ERP5Type/Tool/BaseTool.py b/product/ERP5Type/Tool/BaseTool.py
index 3969b7eee1..58c7371b99 100644
--- a/product/ERP5Type/Tool/BaseTool.py
+++ b/product/ERP5Type/Tool/BaseTool.py
@@ -59,8 +59,10 @@ class BaseTool (UniqueObject, Folder):
     manage_overview = DTMLFile( 'explainBaseTool', _dtmldir )
 
     # Filter content (ZMI))
-    def __init__(self):
-        return Folder.__init__(self, self.__class__.id)
+    def __init__(self, id=None):
+        if id is None:
+          id = self.__class__.id
+        return Folder.__init__(self, id)
 
     # Filter content (ZMI))
     def filtered_meta_types(self, user=None):
-- 
2.30.9