[FIX]share: convert to string and set group_id

bzr revid: kjo@tinyerp.com-20120417093156-d29vpph8it39sqiw
This commit is contained in:
Kuldeep Joshi (OpenERP) 2012-04-17 15:01:56 +05:30
parent dfda972285
commit a498392b47
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ class share_wizard_portal(osv.osv_memory):
# must take care of existing users, by adding them to the new group, which is group_ids[0],
# and adding the shortcut
selected_user_ids = [x.id for x in wizard_data.user_ids]
self.pool.get('res.users').write(cr, UID_ROOT, selected_user_ids, {'groups_id': [(4,group_id)]})
self.pool.get('res.users').write(cr, UID_ROOT, selected_user_ids, {'groups_id': [(4,group_id[0])]})
self._setup_action_and_shortcut(cr, uid, wizard_data, selected_user_ids, make_home=False, context=context)
# populate the result lines for existing users too
for user in wizard_data.user_ids:

View File

@ -737,7 +737,7 @@ class share_wizard(osv.osv_memory):
# B.
main_domain = wizard_data.domain if wizard_data.domain != '[]' else DOMAIN_ALL
self._create_or_combine_sharing_rule(cr, current_user, wizard_data,
group_id, model_id=model.id, domain=main_domain,
group_id, model_id=model.id, domain=str(main_domain),
restrict=True, context=context)
# C.
self._create_indirect_sharing_rules(cr, current_user, wizard_data, group_id, obj1, context=context)