Commit a787f7f6 authored by Christophe Dumez's avatar Christophe Dumez

- Fixed problems when the factory method is not based on portal type id.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9223 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 33560638
...@@ -255,8 +255,7 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -255,8 +255,7 @@ class ERP5TypeInformation( FactoryTypeInformation,
ptype_object = self ptype_object = self
# get the klass of the object based on the constructor document # get the klass of the object based on the constructor document
m = Products.ERP5Type._m m = Products.ERP5Type._m
ptype_name = ''.join(ptype_object.id.split(' ')) constructor = self.factory
constructor = 'add%s' %(ptype_name)
klass = None klass = None
for method, doc in m.items(): for method, doc in m.items():
if method == constructor: if method == constructor:
...@@ -290,8 +289,7 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -290,8 +289,7 @@ class ERP5TypeInformation( FactoryTypeInformation,
ptype_object = self ptype_object = self
# get the klass of the object based on the constructor document # get the klass of the object based on the constructor document
m = Products.ERP5Type._m m = Products.ERP5Type._m
ptype_name = ''.join(ptype_object.id.split(' ')) constructor = self.factory
constructor = 'add%s' %(ptype_name)
klass = None klass = None
for method, doc in m.items(): for method, doc in m.items():
if method == constructor: if method == constructor:
......
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