diff --git a/addons/portal_project/security/portal_security.xml b/addons/portal_project/security/portal_security.xml
index 8d58ed70aeb..67e57766ebd 100644
--- a/addons/portal_project/security/portal_security.xml
+++ b/addons/portal_project/security/portal_security.xml
@@ -33,27 +33,26 @@
- Project/Task: employees: public, portal, employee or following or assigned
+ Project/Task: employees: public, portal, employee or (followers and following)
['|',
- ('user_id', '=', user.id),
- '|',
- ('project_id.privacy_visibility', 'in', ['public', 'portal', 'employees']),
- '&',
- ('project_id.privacy_visibility', '=', 'followers'),
- ('message_follower_ids', 'in', [user.partner_id.id]),
+ ('project_id.privacy_visibility', 'in', ['public', 'portal', 'employees']),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
]
- Project/Task: portal users: public or portal and following
+ Project/Task: portal users: public or (portal and colleagues following) or (followers and following)
- ['|',
- ('project_id.privacy_visibility', '=', 'public'),
+ ['|', '|',
+ ('project_id.privacy_visibility', 'in', ['public']),
'&',
- ('project_id.privacy_visibility', 'in', ['portal', 'followers']),
- '|',
- ('message_follower_ids','in', [user.partner_id.id]),
- ('user_id', '=', user.id),
+ ('project_id.privacy_visibility', '=', 'portal'),
+ ('message_follower_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
]
diff --git a/addons/portal_project_issue/security/portal_security.xml b/addons/portal_project_issue/security/portal_security.xml
index 120611cec0e..598c1620a82 100644
--- a/addons/portal_project_issue/security/portal_security.xml
+++ b/addons/portal_project_issue/security/portal_security.xml
@@ -3,27 +3,27 @@
- Project/Issue: portal users: public or portal and following
+ Project/Issue: portal users: public or (portal and colleagues following) or (followers and following)
- [ '&',
- ('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])
- ]
+ ['|', '|',
+ ('project_id.privacy_visibility', 'in', ['public']),
+ '&',
+ ('project_id.privacy_visibility', '=', 'portal'),
+ ('message_follower_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
+ ]
- Project/Issue: employees: public, portal, employee or following or assigned
+ Project/Issue: employees: public, portal, employee or (followers and following)
['|',
- ('user_id', '=', user.id),
- '|',
- ('project_id.privacy_visibility', 'in', ['public', 'portal', 'employees']),
- '&',
- ('project_id.privacy_visibility', '=', 'followers'),
- ('message_follower_ids', 'in', [user.partner_id.id]),
+ ('project_id.privacy_visibility', 'in', ['public', 'portal', 'employees']),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
]
diff --git a/addons/portal_project_long_term/security/portal_security.xml b/addons/portal_project_long_term/security/portal_security.xml
index eab70ebe734..d8aec542847 100644
--- a/addons/portal_project_long_term/security/portal_security.xml
+++ b/addons/portal_project_long_term/security/portal_security.xml
@@ -3,16 +3,9 @@
- Project/Phase: portal users: public or portal and following
+ Project/Phase: portal users: public or (portal and colleagues following) or (followers and following)
- ['|',
- ('project_id.privacy_visibility', '=', 'public'),
- '&',
- ('project_id.privacy_visibility', 'in', ['portal', 'followers']),
- '|',
- ('message_follower_ids','in', [user.partner_id.id]),
- ('user_id', '=', user.id),
- ]
+ [('project_id.privacy_visibility', 'in', ['public', 'portal'])]
diff --git a/addons/project/project.py b/addons/project/project.py
index 0b99356a9de..f2d80a8ef22 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -210,7 +210,7 @@ class project(osv.osv):
def _get_visibility_selection(self, cr, uid, context=None):
""" Overriden in portal_project to offer more options """
- return [('public', 'All Users'),
+ return [('public', 'Public'),
('employees', 'Employees Only'),
('followers', 'Followers Only')]
@@ -275,7 +275,17 @@ class project(osv.osv):
"with Tasks (or optionally Issues if the Issue Tracker module is installed)."),
'alias_model': fields.selection(_alias_models, "Alias Model", select=True, required=True,
help="The kind of document created when an email is received on this project's email alias"),
- 'privacy_visibility': fields.selection(_visibility_selection, 'Privacy / Visibility', required=True),
+ 'privacy_visibility': fields.selection(_visibility_selection, 'Privacy / Visibility', required=True,
+ help="Holds visibility of the tasks or issues that belong to the current project:\n"
+ "- Public: everybody sees everything; if portal is activated, portal users\n"
+ " see all tasks or issues; if anonymous portal is activated, visitors\n"
+ " see all tasks or issues\n"
+ "- Portal (only available if Portal is installed): employees see everything;\n"
+ " if portal is activated, portal users see the tasks or issues followed by\n"
+ " them or by someone of their company\n"
+ "- Employees Only: employees see all tasks or issues\n"
+ "- Followers Only: employees see only the followed tasks or issues; if portal\n"
+ " is activated, portal users see the followed tasks or issues."),
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,),
'doc_count':fields.function(_get_attached_docs, string="Number of documents attached", type='int')
}
diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml
index 4bbaa9b788e..e674019443b 100644
--- a/addons/project/security/project_security.xml
+++ b/addons/project/security/project_security.xml
@@ -75,15 +75,13 @@
- Project/Task: employees: public or employee or following or assigned
+ Project/Task: employees: public or employee or (followers and following)
['|',
- ('user_id', '=', user.id),
- '|',
- ('project_id.privacy_visibility', 'in', ['public', 'employees']),
- '&',
- ('project_id.privacy_visibility', '=', 'followers'),
- ('message_follower_ids', 'in', [user.partner_id.id]),
+ ('project_id.privacy_visibility', 'in', ['public', 'employees']),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
]
diff --git a/addons/project_issue/security/project_issue_security.xml b/addons/project_issue/security/project_issue_security.xml
index 5215a94a8b7..c8ed12086e4 100644
--- a/addons/project_issue/security/project_issue_security.xml
+++ b/addons/project_issue/security/project_issue_security.xml
@@ -10,15 +10,13 @@
- Project/Issue: employees: public or employee or following or assigned
+ Project/Issue: employees: public or employee or (followers and following)
['|',
- '|',
- ('project_id.privacy_visibility', 'in', ['public', 'employees']),
- '&',
- ('project_id.privacy_visibility', '=', 'followers'),
- ('message_follower_ids', 'in', [user.id]),
- ('user_id', '=', user.id),
+ ('project_id.privacy_visibility', 'in', ['public', 'employees']),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.id]),
]