Commit fc73fe94 authored by Jean-Paul Smets's avatar Jean-Paul Smets

New __init__ method to make sure no title is defined by default on a folder....

New __init__ method to make sure no title is defined by default on a folder. Removed PS XMLObject cause Folder is not an XMLObject.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13335 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a1846a03
...@@ -43,8 +43,10 @@ from Products.ERP5Type.Utils import sortValueList ...@@ -43,8 +43,10 @@ from Products.ERP5Type.Utils import sortValueList
try: try:
from Products.CMFCore.CMFBTreeFolder import CMFBTreeFolder from Products.CMFCore.CMFBTreeFolder import CMFBTreeFolder
from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2Base
except ImportError: except ImportError:
from Products.BTreeFolder2.CMFBTreeFolder import CMFBTreeFolder from Products.BTreeFolder2.CMFBTreeFolder import CMFBTreeFolder
from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2Base
from AccessControl import getSecurityManager from AccessControl import getSecurityManager
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from random import randint from random import randint
...@@ -332,7 +334,6 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn): ...@@ -332,7 +334,6 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn):
) )
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.SimpleItem , PropertySheet.SimpleItem
, PropertySheet.Folder , PropertySheet.Folder
) )
...@@ -345,6 +346,13 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn): ...@@ -345,6 +346,13 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn):
_setPropValue = Base._setPropValue _setPropValue = Base._setPropValue
_propertyMap = Base._propertyMap # are there any others XXX ? _propertyMap = Base._propertyMap # are there any others XXX ?
# Overload __init__ so that we do not take into account title
# This is required for test_23_titleIsNotDefinedByDefault
def __init__(self, id):
self.id = id
BTreeFolder2Base.__init__(self, id)
# Override Zope default by folder id generation # Override Zope default by folder id generation
def _get_id(self, id): def _get_id(self, id):
if self._getOb(id, None) is None : if self._getOb(id, None) is None :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment