[Erp5-report] r14027 - /erp5/trunk/products/ERP5/Tool/SimulationTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 9 10:12:22 CEST 2007
Author: seb
Date: Mon Apr 9 10:12:20 2007
New Revision: 14027
URL: http://svn.erp5.org?rev=14027&view=rev
Log:
Revert the previous commit and fixed the problem found on dates.
The at_date parameter must be in both the where expression and
in pamaters given to the zsql methods.
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=14027&r1=14026&r2=14027&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/SimulationTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/SimulationTool.py Mon Apr 9 10:12:20 2007
@@ -1059,6 +1059,14 @@
"""
new_kw = self._generateSQLKeywordDict(table='item',strict_simulation_state=strict_simulation_state,**kw)
+ at_date = kw.get('at_date',None)
+ if at_date is not None:
+ from Products.ZSQLCatalog.SQLCatalog import QueryMixin
+ query_mixin = QueryMixin()
+ at_date = query_mixin._quoteSQLString(at_date)
+ # Do not remove at_date in new_kw, it is required in
+ # order to do a "select item left join item on date"
+ new_kw['at_date'] = at_date
# Extra parameters for the SQL Method
new_kw['join_on_item'] = new_kw.get('at_date') or \
More information about the Erp5-report
mailing list