[FIX] website_project_issue: Issues visibility in frontend for portal users

The domain used to search the project issues in the website_project_issue
controller(['/my', '/my/home']) was useless thanks to the ir.rule portal_issue_rule

opw:676447
This commit is contained in:
Goffin Simon
2016-05-04 10:46:13 +02:00
parent 6beeec363a
commit 86ae7b1e1a
@@ -10,15 +10,7 @@ class WebsiteAccount(website_account):
def account(self):
response = super(WebsiteAccount, self).account()
user = request.env.user
# TDE FIXME: shouldn't that be mnaged by the access rule itself ?
# portal projects where you or someone from your company are a follower
project_issues = request.env['project.issue'].search([
'&',
('project_id.privacy_visibility', '=', 'portal'),
'|',
('message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
('message_partner_ids', 'child_of', [user.partner_id.id])
])
project_issues = request.env['project.issue'].search([])
response.qcontext.update({'issues': project_issues})
return response