diff options
| author | fw-bot <otis@odoo.com> | 2020-09-28 10:39:06 +0000 |
|---|---|---|
| committer | jdoutreloux <jud@odoo.com> | 2020-09-29 08:34:43 +0000 |
| commit | 13fc0ab18eb1e1d4ba47b7a1e66cd5079d692d8b (patch) | |
| tree | 79343d66bdb9a1f22d5ca39919616534a3fe3dad /addons/hr_timesheet | |
| parent | 8d26094b020db0245620e9898e02486acf3674bf (diff) | |
[FIX] hr_timesheet : fix timesheet visibility on portal
If a portal user was a customer but not a follower of a project
he didn't have access to the timesheets linked to the project.
Task-2299286
closes odoo/odoo#58621
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_timesheet')
| -rw-r--r-- | addons/hr_timesheet/models/hr_timesheet.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/hr_timesheet/models/hr_timesheet.py b/addons/hr_timesheet/models/hr_timesheet.py index 060f08ceb47..bdb6a2fd2b5 100644 --- a/addons/hr_timesheet/models/hr_timesheet.py +++ b/addons/hr_timesheet/models/hr_timesheet.py @@ -125,10 +125,11 @@ class AccountAnalyticLine(models.Model): def _timesheet_get_portal_domain(self): return ['&', - '|', '|', + '|', '|', '|', ('task_id.project_id.message_partner_ids', 'child_of', [self.env.user.partner_id.commercial_partner_id.id]), ('task_id.message_partner_ids', 'child_of', [self.env.user.partner_id.commercial_partner_id.id]), ('task_id.project_id.allowed_portal_user_ids', 'child_of', [self.env.user.id]), + ('task_id.allowed_user_ids', 'in', [self.env.user.id]), ('task_id.project_id.privacy_visibility', '=', 'portal')] def _timesheet_preprocess(self, vals): |
