Commit 24b8b5bb authored by Jean-Paul Smets's avatar Jean-Paul Smets

Guessing temp factory is a bit better

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7254 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fe53652b
......@@ -251,8 +251,12 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
and invoking propertyMap
"""
from Products.ERP5Type import Document
# Access the factory method
factory_method = getattr(Document, "newTemp%s" % self.id) # Fix
# Access the factory method for temp object by guessing it
# according to ERP5 naming conventions (not very nice)
factory_method_id = self.factory.replace('add', 'newTemp')
if not factory_method_id.startswith('newTemp'):
raise
factory_method = getattr(Document, factory_method_id)
id = "some_very_unlikely_temp_object_id_which_should_not_exist"
portal = self.portal_url.getPortalObject()
portal_ids = portal.objectIds()
......
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