[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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user