diff --git a/product/ERP5Type/Tool/TypesTool.py b/product/ERP5Type/Tool/TypesTool.py
index 37ae34ba71df01b7db0dab2cb1e5325604a7d844..634445a7c9c8ad406d0d93b567b47ef60f1c8134 100644
--- a/product/ERP5Type/Tool/TypesTool.py
+++ b/product/ERP5Type/Tool/TypesTool.py
@@ -112,7 +112,7 @@ class TypesTool(TypeProvider):
       pass
     try:
       script = self.getPortalObject().portal_workflow \
-        .dynamic_class_generation_interaction_workflow.scripts \
+        .dynamic_class_generation_interaction_workflow.getScriptValueList() \
         .DynamicClassGeneration_resetDynamicDocuments
       new = '.resetDynamicDocumentsOnceAtTransactionBoundary('
       if new not in script._body: