diff --git a/product/ERP5/Tool/SimulationTool.py b/product/ERP5/Tool/SimulationTool.py
index d1e601e3e5d538283c22cf8aac8a6bf001f9535b..27082b93348880a3640a6ebc9511a775dd41309f 100644
--- a/product/ERP5/Tool/SimulationTool.py
+++ b/product/ERP5/Tool/SimulationTool.py
@@ -631,10 +631,9 @@ class SimulationTool(BaseTool):
         group_by_expression_list.append('variation_text')
       if group_by_movement:
         group_by_expression_list.append('uid')
+      if group_by_resource:
+        group_by_expression_list.append('resource_uid')
       if group_by_expression_list:
-        # by default, we group by resource
-        if group_by_resource:
-          group_by_expression_list.append('resource_uid')
         new_kw['group_by'] = group_by_expression_list
       return sql_kw, new_kw