[Erp5-report] r16056 - /erp5/trunk/products/ERP5/Tool/SimulationTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Sep 5 09:38:10 CEST 2007


Author: vincent
Date: Wed Sep  5 09:38:10 2007
New Revision: 16056

URL: http://svn.erp5.org?rev=16056&view=rev
Log:
group_by_resource alone has a meaning, for example if nodes are explicitely selected (I was to get the total amount of that resource on [those nodes|that node]). It should not be prevented by code, because it leads to situation where providing just one grouping criterion causes no grouping to be done on final query, which causes in turn a SQL syntax error.

Modified:
    erp5/trunk/products/ERP5/Tool/SimulationTool.py

Modified: erp5/trunk/products/ERP5/Tool/SimulationTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/SimulationTool.py?rev=16056&r1=16055&r2=16056&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/SimulationTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/SimulationTool.py Wed Sep  5 09:38:10 2007
@@ -631,10 +631,9 @@
         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 
 




More information about the Erp5-report mailing list