Commit c3d08aeb authored by Yoshinori Okuji's avatar Yoshinori Okuji

Stop skipping erp5.portal_type or erp5.temp_portal_type, because this makes...

Stop skipping erp5.portal_type or erp5.temp_portal_type, because this makes interactions not working, and dangerous as well, as accessors are stored into document classes directly.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39476 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8e4e3e4a
......@@ -830,11 +830,7 @@ class Base( CopyContainer,
cache_factory='erp5_ui_long'))
def _aq_key(self):
klass_list = self.__class__.__mro__
i = 0
while klass_list[i].__module__ in ('erp5.portal_type', 'erp5.temp_portal_type'):
i += 1
return (self.portal_type, klass_list[i])
return (self.portal_type, self.__class__)
def _propertyMap(self):
""" Method overload - properties are now defined on the ptype """
......@@ -858,11 +854,7 @@ class Base( CopyContainer,
Test purpose
"""
ptype = self.portal_type
klass_list = self.__class__.__mro__
i = 0
while klass_list[i].__module__ in ('erp5.portal_type', 'erp5.temp_portal_type'):
i += 1
klass = klass_list[i]
klass = self.__class__
aq_key = (ptype, klass) # We do not use _aq_key() here for speed
initializePortalTypeDynamicProperties(self, klass, ptype, aq_key, \
self.getPortalObject())
......@@ -874,11 +866,7 @@ class Base( CopyContainer,
# and default properties can be associated per portal type
# and per class. Other uses are possible (ex. WebSection).
ptype = self.portal_type
klass_list = self.__class__.__mro__
i = 0
while klass_list[i].__module__ in ('erp5.portal_type', 'erp5.temp_portal_type'):
i += 1
klass = klass_list[i]
klass = self.__class__
aq_key = (ptype, klass) # We do not use _aq_key() here for speed
# If this is a portal_type property and everything is already defined
......
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