Skip to content
Snippets Groups Projects
Commit 86ae7b1e authored by Goffin Simon's avatar Goffin Simon
Browse files

[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
parent 6beeec36
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment