[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:
Goffin Simon
2016-04-26 12:50:51 +02:00
parent 02fd74a3fa
commit 3108a49ab2
2 changed files with 2 additions and 2 deletions
+2 -1
View File
@@ -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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 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