[FIX] portal_project_issue: ir.rules were failing to show relevant issues

Portal users expect to see the issues they directly follow
but also the issues whose "Customer" is them or anyone
from their company (and all of this should work only
for projects that are public, visible to portal or
visible to their followers. Could be refined further

bzr revid: odo@openerp.com-20130425162235-u64fufklfdhh77ga
This commit is contained in:
Olivier Dony 2013-04-25 18:22:35 +02:00
parent 8590e68b2b
commit bc79d1cdd7
1 changed files with 7 additions and 8 deletions

View File

@ -5,14 +5,13 @@
<record id="portal_issue_rule" model="ir.rule">
<field name="name">Project/Issue: portal users: public or portal and following</field>
<field name="model_id" ref="project_issue.model_project_issue"/>
<field name="domain_force">['|',
('project_id.privacy_visibility', '=', 'public'),
'&amp;',
('project_id.privacy_visibility', 'in', ['portal', 'followers']),
'|',
('message_follower_ids','in', [user.partner_id.id]),
('user_id', '=', user.id),
]</field>
<field name="domain_force">[ '&amp;',
('project_id.privacy_visibility', 'in', ['public', 'portal', 'followers']),
'|', '|',
('message_follower_ids','in', [user.partner_id.id]),
('user_id', '=', user.id),
('partner_id', 'child_of', [user.commercial_partner_id.id])
]</field>
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
</record>