[Erp5-report] r9213 - /erp5/trunk/products/ERP5Type/ERP5Type.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Aug 14 23:00:39 CEST 2006


Author: jerome
Date: Mon Aug 14 23:00:33 2006
New Revision: 9213

URL: http://svn.erp5.org?rev=9213&view=rev
Log:
when guessing the name of the temp method, only replace the first occurence of "add" 


Modified:
    erp5/trunk/products/ERP5Type/ERP5Type.py

Modified: erp5/trunk/products/ERP5Type/ERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ERP5Type.py?rev=9213&r1=9212&r2=9213&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ERP5Type.py (original)
+++ erp5/trunk/products/ERP5Type/ERP5Type.py Mon Aug 14 23:00:33 2006
@@ -343,7 +343,7 @@
       from Products.ERP5Type import Document
       # Access the factory method for temp object by guessing it
       # according to ERP5 naming conventions (not very nice)
-      factory_method_id = self.factory.replace('add', 'newTemp')
+      factory_method_id = self.factory.replace('add', 'newTemp', 1)
       if not factory_method_id.startswith('newTemp'):
         raise
       factory_method = getattr(Document, factory_method_id)




More information about the Erp5-report mailing list