Commit e900b16f authored by Jérome Perrin's avatar Jérome Perrin

business template: do not export owner role in LocalRoleTemplateItem

parent a93e5999
......@@ -4569,12 +4569,15 @@ class LocalRolesTemplateItem(BaseTemplateItem):
xml_data = '<local_roles_item>'
# local roles
xml_data += '\n <local_roles>'
for key in sorted(local_roles_dict):
xml_data += "\n <role id='%s'>" %(key,)
tuple = local_roles_dict[key]
for item in tuple:
xml_data += "\n <item>%s</item>" %(item,)
xml_data += '\n </role>'
for user_id, role_list in sorted(local_roles_dict.items()):
if 'Owner' in role_list:
# We don't export Owner role as it set automatically when installing business template.
role_list.remove('Owner')
if role_list:
xml_data += "\n <role id='%s'>" %(user_id,)
for role in role_list:
xml_data += "\n <item>%s</item>" %(role,)
xml_data += '\n </role>'
xml_data += '\n </local_roles>'
if local_roles_group_id_dict:
......
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