diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 67eda45d39628b5ff485ec6f9a01e9a522863600..461adadc464e1c53d592bc92ca2a8a519fc0500d 100644 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -2105,13 +2105,12 @@ class Base( CopyContainer, if context is None: # Make a copy klass = self.__class__ - if getattr(klass, 'id', None): - # If id is defined on the class, it is usually - # the sign that this is a tool and that - # __init__ takes no id parameter - context = klass() - else: + try: context = klass(self.getId()) + except TypeError: + # If __init__ does not take the id argument, the class is probably + # a tool, and the id is fixed. + context = klass() context.__dict__.update(self.__dict__) # Copy REQUEST properties to self if REQUEST is not None: