diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index 487c3d122bf9ad0d11808dc738493c3bf1b8fa56..7c66a5888cc71a5537d0e90f5c9cbce776ea56a5 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -587,6 +587,8 @@ class BaseTemplateItem(Implicit, Persistent): attr_set.update(('_arg', 'template')) elif interfaces.IIdGenerator.providedBy(obj): attr_set.update(('last_max_id_dict', 'last_id_dict')) + elif classname == 'Types Tool' and klass.__module__ == 'erp5.portal_type': + attr_set.add('type_provider_list') else: obj = self.migrateToPortalTypeClass(obj) @@ -1444,8 +1446,9 @@ class ToolTemplateItem(PathTemplateItem): portal = context.getPortalObject() types_tool = portal.portal_types for type_container_id, obj in self._objects.iteritems(): - if interfaces.ITypeProvider.providedBy(obj) and \ - type_container_id not in types_tool.type_provider_list: + if (interfaces.ITypeProvider.providedBy(obj) and + type_container_id != types_tool.id and + type_container_id not in types_tool.type_provider_list): types_tool.type_provider_list = tuple(types_tool.type_provider_list) + \ (type_container_id,) diff --git a/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_types.xml b/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_types.xml index d70a5515fdee8ce6263c3730b5272df53f1737c1..538625ac9fa092cffa1385ddfa9f020b18573a5c 100644 --- a/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_types.xml +++ b/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_types.xml @@ -32,15 +32,6 @@ <key> <string>last_id</string> </key> <value> <string>2</string> </value> </item> - <item> - <key> <string>type_provider_list</string> </key> - <value> - <tuple> - <string>portal_solvers</string> - <string>portal_types</string> - </tuple> - </value> - </item> </dictionary> </pickle> </record> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index d277259448d1731fb76389ae833fbe22370aece4..7ff7ea27ee9e8b84d41961806302a48e67ffaabb 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -40892 \ No newline at end of file +40893 \ No newline at end of file