[Erp5-report] r27671 - /erp5/trunk/products/ERP5/Document/TradeCondition.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jun 19 09:37:23 CEST 2009
Author: fabien
Date: Fri Jun 19 09:37:18 2009
New Revision: 27671
URL: http://svn.erp5.org?rev=27671&view=rev
Log:
fix a mistake : context can not be defined at this step, it's beter to use None default value and to call getStart/StopDate on document
Modified:
erp5/trunk/products/ERP5/Document/TradeCondition.py
Modified: erp5/trunk/products/ERP5/Document/TradeCondition.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeCondition.py?rev=27671&r1=27670&r2=27671&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeCondition.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeCondition.py [utf8] Fri Jun 19 09:37:18 2009
@@ -164,6 +164,8 @@
reference_list = []
trade_model_line_composed_list = []
containting_object_list = []
+ start_date = None
+ stop_date = None
if context is not None:
document = context
if getattr(context, 'getExplanationValue', None) is not None:
@@ -171,8 +173,11 @@
# for contained Trade Model Lines
document = context.getExplanationValue()
containting_object_list.append(document)
- containting_object_list.extend(self.findEffectiveSpecialiseValueList(context=self,
- start_date=context.getStartDate(), stop_date=context.getStopDate()))
+ start_date = document.getStartDate()
+ stop_date = document.getStartDate()
+ containting_object_list.extend(\
+ self.findEffectiveSpecialiseValueList(context=self,
+ start_date=start_date, stop_date=stop_date))
for specialise in containting_object_list:
for trade_model_line in specialise.contentValues(
More information about the Erp5-report
mailing list