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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Aug 28 15:10:36 CEST 2007


Author: vincent
Date: Tue Aug 28 15:10:35 2007
New Revision: 15870

URL: http://svn.erp5.org?rev=15870&view=rev
Log:
Make _generateSQLKeywordDictFromKeywordDict more usable: provide default values and avoid poluting parameters with internal processing.

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=15870&r1=15869&r2=15870&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/SimulationTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/SimulationTool.py Tue Aug 28 15:10:35 2007
@@ -364,7 +364,9 @@
         return self._generateSQLKeywordDictFromKeywordDict(table=table,
                  sql_kw=sql_kw, new_kw=new_kw)
 
-    def _generateSQLKeywordDictFromKeywordDict(self, table, sql_kw, new_kw):
+    def _generateSQLKeywordDictFromKeywordDict(self, table='stock', sql_kw={}, new_kw={}):
+        sql_kw = sql_kw.copy()
+        new_kw = new_kw.copy()
         # Some columns cannot be found automatically, prepend table name to
         # avoid ambiguities.
         # Group-by expression




More information about the Erp5-report mailing list