[Erp5-report] r31723 kazuhiko - /erp5/trunk/products/ERP5Type/XMLMatrix.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jan 13 14:41:32 CET 2010
Author: kazuhiko
Date: Wed Jan 13 14:41:29 2010
New Revision: 31723
URL: http://svn.erp5.org?rev=31723&view=rev
Log:
make newCellContent() try to find '* Cell' portal type if portal type is not specified.
Modified:
erp5/trunk/products/ERP5Type/XMLMatrix.py
Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=31723&r1=31722&r2=31723&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Wed Jan 13 14:41:29 2010
@@ -514,6 +514,12 @@
Creates a new content as a cell. This method is
meant to be overriden by subclasses.
"""
+ if portal_type is None:
+ try:
+ portal_type = [x.getId() for x in self.allowedContentTypes() \
+ if x.getId().endswith(' Cell')][0]
+ except IndexError:
+ pass
return self.newContent(id=id, portal_type=portal_type, **kw)
security.declareProtected( Permissions.AccessContentsInformation,
More information about the Erp5-report
mailing list