From b2d2cfba7b2d8f8500c43fbdb82a9de7a3281adf Mon Sep 17 00:00:00 2001 From: "Xavier BOL (xbo)" Date: Thu, 21 Jan 2021 16:58:41 +0000 Subject: [PATCH] [FIX] sale_timesheet: review views inherited from project.task model Before this commit, when the user with no access right to Timesheet App wants to see the tasks in a project and sale_timesheet module is installed, the user has a traceback saying remaining_hours field is not find in the parent view of `sale_timesheet.view_task_form2_inherit_sale_timesheet`. This traceback is raised because the `hr_timesheet.view_task_form2_inherited` is not used if the user has no access right to Timesheet App and then remaining_hours field is not defined for this user because this field is appeared in the view in hr_timesheet module. This commit revises the views inherited from the project.task model to give the user without access rights in Timesheet the possibility to see the tasks in any project he can see. opw-2429662 closes odoo/odoo#65000 X-original-commit: d63614035c84d0c0ab564102c65541d1b2b08277 Signed-off-by: Simon Goffin (sig) --- .../views/project_task_views.xml | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/addons/sale_timesheet/views/project_task_views.xml b/addons/sale_timesheet/views/project_task_views.xml index 1b3f205aebc..4e688813fe9 100644 --- a/addons/sale_timesheet/views/project_task_views.xml +++ b/addons/sale_timesheet/views/project_task_views.xml @@ -130,7 +130,8 @@ project.task.form.inherit.timesheet project.task - + + timesheet_invoice_id != False @@ -156,6 +157,20 @@ domain="[('is_service', '=', True), ('order_partner_id', 'child_of', parent.commercial_partner_id), ('is_expense', '=', False), ('state', 'in', ['sale', 'done']), ('order_id', '=?', parent.project_sale_order_id)]" optional="hide"/> + + + + + + @@ -182,20 +197,6 @@ {'invisible': ['|', ('allow_billable', '=', False), ('partner_id', '=', False)]} - - - - - - 1