diff --git a/product/ERP5Type/XMLMatrix.py b/product/ERP5Type/XMLMatrix.py index cd781d8273783affcabeb7a23bc1e6700f2a1dc9..e5a402202029699cf5e4b2ced333c7760ac81815 100644 --- a/product/ERP5Type/XMLMatrix.py +++ b/product/ERP5Type/XMLMatrix.py @@ -514,6 +514,12 @@ class XMLMatrix(Folder): 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,