From f113980d62a5e8686072fe6fbe5e31ae8103d148 Mon Sep 17 00:00:00 2001 From: Julien Muchembled <jm@nexedi.com> Date: Mon, 28 Sep 2009 17:35:00 +0000 Subject: [PATCH] minor changes git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/portal_types@29269 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/tests/testScribusUtils.py | 2 +- product/ERP5Type/PropertySheet/__init__.py | 1 - product/ERP5Type/Tool/TypesTool.py | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/product/ERP5Form/tests/testScribusUtils.py b/product/ERP5Form/tests/testScribusUtils.py index d0aab87795..564b543ff1 100644 --- a/product/ERP5Form/tests/testScribusUtils.py +++ b/product/ERP5Form/tests/testScribusUtils.py @@ -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 - self.portal.portal_types.Authorisation.setPropertySheetList('Task') + self.portal.portal_types.Authorisation._setTypePropertySheet('Task') authorisation_module = self.portal.authorisation_module start_date = DateTime('2000/01/01') stop_date = DateTime('2001/01/01 12:00 GMT') diff --git a/product/ERP5Type/PropertySheet/__init__.py b/product/ERP5Type/PropertySheet/__init__.py index 0276f44042..b018453306 100644 --- a/product/ERP5Type/PropertySheet/__init__.py +++ b/product/ERP5Type/PropertySheet/__init__.py @@ -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 diff --git a/product/ERP5Type/Tool/TypesTool.py b/product/ERP5Type/Tool/TypesTool.py index 1000273462..fe8eda69bb 100644 --- a/product/ERP5Type/Tool/TypesTool.py +++ b/product/ERP5Type/Tool/TypesTool.py @@ -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, + stacklevel=2) 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')) -- 2.30.9