[Erp5-report] r15851 - /erp5/trunk/products/ERP5/Document/OrderLine.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Aug 27 17:49:55 CEST 2007
Author: jp
Date: Mon Aug 27 17:49:55 2007
New Revision: 15851
URL: http://svn.erp5.org?rev=15851&view=rev
Log:
Fixed usage of Transactional Variable
Modified:
erp5/trunk/products/ERP5/Document/OrderLine.py
Modified: erp5/trunk/products/ERP5/Document/OrderLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/OrderLine.py?rev=15851&r1=15850&r2=15851&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/OrderLine.py (original)
+++ erp5/trunk/products/ERP5/Document/OrderLine.py Mon Aug 27 17:49:55 2007
@@ -71,13 +71,13 @@
"""Return true if the object contains lines.
We cache results in a volatile variable.
"""
- acquisition_key = ('hasLineContent', self.getPath())
- transactional_variable = getTransactionalVariable(acquisition_key)
+ transactional_variable = getTransactionalVariable(self)
+ call_method_key = ('Products.ERP5.Document.OrderLine.hasLineContent', self.getPhysicalPath())
try:
- result = transactional_variable['hasLineContent']
+ result = transactional_variable[call_method_key]
except KeyError:
- result = (len(self.contentValues(meta_type=self.meta_type)) > 0)
- transactional_variable['hasLineContent'] = result
+ result = len(self.contentValues(meta_type=self.meta_type)) > 0
+ transactional_variable[call_method_key] = result
return result
def applyToOrderLineRelatedMovement(self, portal_type='Simulation Movement',
More information about the Erp5-report
mailing list