[FIX] crm_claim: access rights for portal user
The portal user is not allowed to read the crm.team model. opw:673480
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
|
||||
@@ -16,7 +17,7 @@ class crm_team(osv.Model):
|
||||
context = {}
|
||||
if user_id is None:
|
||||
user_id = uid
|
||||
team_ids = self.search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', 'in', user_id)], limit=1, context=context)
|
||||
team_ids = self.search(cr, SUPERUSER_ID, ['|', ('user_id', '=', user_id), ('member_ids', 'in', user_id)], limit=1, context=context)
|
||||
team_id = team_ids[0] if team_ids else False
|
||||
if not team_id and context.get('default_team_id'):
|
||||
team_id = context['default_team_id']
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_issues,project_issue,project_issue.model_project_issue,base.group_portal,1,0,0,0
|
||||
access_case_section,crm_team,sales_team.model_crm_team,base.group_portal,1,0,0,0
|
||||
|
||||
|
Reference in New Issue
Block a user