[Erp5-report] r19674 - /erp5/trunk/products/ERP5/Tool/SimulationTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 4 18:18:53 CET 2008
Author: vincent
Date: Tue Mar 4 18:18:52 2008
New Revision: 19674
URL: http://svn.erp5.org?rev=19674&view=rev
Log:
Fix handling of to_date parameter. It was previously comletely broken WRT getTrackingList documentation.
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=19674&r1=19673&r2=19674&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/SimulationTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/SimulationTool.py Tue Mar 4 18:18:52 2008
@@ -1581,8 +1581,18 @@
# order to do a "select item left join item on date"
new_kw['at_date'] = at_date
+ to_date = kw.get('to_date',None)
+ if to_date is not None:
+ query_mixin = QueryMixin()
+ to_date = query_mixin._quoteSQLString(to_date)
+ to_date = to_date.strip("'")
+ # Do not remove to_date in new_kw, it is required in
+ # order to do a "select item left join item on date"
+ new_kw['to_date'] = to_date
+
# Extra parameters for the SQL Method
new_kw['join_on_item'] = new_kw.get('at_date') or \
+ new_kw.get('to_date') or \
new_kw.get('input') or \
new_kw.get('output')
new_kw['date_condition_in_join'] = not (new_kw.get('input') or new_kw.get('output'))
More information about the Erp5-report
mailing list