From 2f0a57f7ea73c1c673792b46466828df85dc3cc9 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 7 Nov 2012 15:12:19 +0100 Subject: [PATCH] [FIX] project_issue: fix access rights error when using portal access Due to the recent change in the computation of the closing duration for project issues[1], viewing issues now fails for users who do not have read access to project.project. This is typically the case for portal users, who can view their own issues but not the project details. Doing the computation in superuser mode does not cause any security problem and avoids the access rights error. bzr revid: odo@openerp.com-20121107141219-0g9d2d5j6z4ta1ce --- addons/project_issue/project_issue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 9d3de2c4f86..c868fe329b8 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -100,7 +100,7 @@ class project_issue(crm.crm_case, osv.osv): res_obj = self.pool.get('resource.resource') res = {} - for issue in self.browse(cr, uid, ids, context=context): + for issue in self.browse(cr, 1, ids, context=context): # if the working hours on the project are not defined, use default ones (8 -> 12 and 13 -> 17 * 5), represented by None if not issue.project_id or not issue.project_id.resource_calendar_id: