Commit 8070ec65 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

create Role Information object as portal_type_as_class way instead of old-fashioned class.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43299 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cab52535
......@@ -155,8 +155,7 @@ class LocalRoleAssignorMixIn(object):
def _importRole(self, role_property_dict):
"""Import a role from a BT or from an old portal type"""
from Products.ERP5Type.Document.RoleInformation import RoleInformation
role = RoleInformation(self.generateNewId())
role = self.newContent(portal_type='Role Information')
for k, v in role_property_dict.iteritems():
if k == 'condition':
if isinstance(v, Expression):
......@@ -174,7 +173,7 @@ class LocalRoleAssignorMixIn(object):
k = 'role_base_category_script_id'
setattr(role, k, v)
role.uid = None
return self[self._setObject(role.id, role, set_owner=0)]
return role
class ERP5TypeInformation(XMLObject,
......
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