diff --git a/product/ERP5/Tool/IdTool.py b/product/ERP5/Tool/IdTool.py
index 9a730406a0d70fca8f0c07e6a34590d8e08c7d70..13fa4e6c156fba5097566a1d7628c869501d516b 100644
--- a/product/ERP5/Tool/IdTool.py
+++ b/product/ERP5/Tool/IdTool.py
@@ -74,7 +74,8 @@ class IdTool(UniqueObject, Folder):
     """
       Generate a new Id
     """
-    if not hasattr(self,'dict_ids'):
+    
+    if getattr(self, 'dict_ids', None) is None:
       self.dict_ids = PersistentMapping()
 
     new_id = None