Commit f113980d authored by Julien Muchembled's avatar Julien Muchembled

minor changes

git-svn-id: 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eb0f1a1a
......@@ -315,7 +315,7 @@ class TestScribusUtils(ERP5TypeTestCase):
self.assertNotEqual(portal_types.getTypeInfo("Authorisation"), None)
# Create an Authorisation
# add property sheet Task in portal type Authorisation
authorisation_module = self.portal.authorisation_module
start_date = DateTime('2000/01/01')
stop_date = DateTime('2001/01/01 12:00 GMT')
......@@ -7,7 +7,6 @@ from DocumentationHelper import DocumentationHelper
from BaseType import BaseType
from ActionInformation import ActionInformation
from RoleInformation import RoleInformation
from TranslationInformation import TranslationInformation
from SortIndex import SortIndex
from BaseCache import BaseCache
from DistributedRamCache import DistributedRamCache
......@@ -102,7 +102,8 @@ class TypesTool(BaseTool, CMFCore_TypesTool.TypesTool):
# than one TypeInformation sharing the same meta_type.
warnings.warn('Please switch to the new format for typeinfo names '
'\"product_id: type_id (meta_type)\", the old '
'spelling will disappear in CMF 1.7', DeprecationWarning)
'spelling will disappear in CMF 1.7', DeprecationWarning,
ti_prod, ti_mt = [x.strip() for x in typeinfo_name.split(':')]
for name, ft in info:
if name.startswith(ti_prod) and name.endswith('(%s)' % ti_mt):
......@@ -116,6 +117,9 @@ class TypesTool(BaseTool, CMFCore_TypesTool.TypesTool):
raise ValueError('An id is required.')
type_info = self.newContent(id, 'Base Type')
if fti:
if 'actions' in fti:
warnings.warn('manage_addTypeInformation does not create default'
' actions automatically anymore.')
type_info.__dict__.update((k, v) for k, v in fti.iteritems()
if k not in ('id', 'actions'))
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