[Erp5-report] r31036 jerome - /erp5/trunk/products/ERP5Type/XMLMatrix.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 3 16:11:07 CET 2009


Author: jerome
Date: Thu Dec  3 16:11:01 2009
New Revision: 31036

URL: http://svn.erp5.org?rev=31036&view=rev
Log:
call newContent and propagate **kw (so that we can create cells with
activate_kw)

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=31036&r1=31035&r2=31036&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Dec  3 16:11:01 2009
@@ -514,16 +514,7 @@
         Creates a new content as a cell. This method is
         meant to be overriden by subclasses.
       """
-      if portal_type is not None :
-        type_name = portal_type
-      else:
-        content_types = self.allowedContentTypes()
-        if len(content_types) >= 1:
-          type_name = content_types[0].id
-        else:
-          type_name = self.portal_type
-      self.invokeFactory(type_name=type_name,id=id)
-      return self.get(id)
+      return self.newContent(id=id, portal_type=portal_type, **kw)
 
     security.declareProtected( Permissions.AccessContentsInformation,
                                'getCellKeyList' )




More information about the Erp5-report mailing list