Commit 2805158c authored by Julien Muchembled's avatar Julien Muchembled

Fix 'type_provider_list' attribute of types tool

This fixes TestCrmReports.testEventActivity

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43491 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cb96aee1
......@@ -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,)
......
......@@ -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>
......
40892
\ No newline at end of file
40893
\ No newline at end of file
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