From 6e13a10519822593ea43c80270ff0e99ec567d65 Mon Sep 17 00:00:00 2001 From: Kartik Chavda Date: Fri, 14 Oct 2022 09:58:21 +0000 Subject: [PATCH] [FIX] sale_{project,timesheet}: hide SOL field when task is not billable This commit hide SOL field for project task form view and hide it's value from tree view when task is not billable and give correct xpath on SOL field attributes to display remaining hour and price unit in name_search. task-3018123 X-original-commit: https://github.com/odoo/odoo/commit/eeb53703c2603ec13a8e43cd68c79959d4b9fb57 Part-of: odoo/odoo#106956 --- addons/sale_project/views/project_task_views.xml | 2 +- addons/sale_timesheet/views/project_task_views.xml | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/addons/sale_project/views/project_task_views.xml b/addons/sale_project/views/project_task_views.xml index caa28931d67..e5b5b3f0eac 100644 --- a/addons/sale_project/views/project_task_views.xml +++ b/addons/sale_project/views/project_task_views.xml @@ -75,7 +75,7 @@ - + diff --git a/addons/sale_timesheet/views/project_task_views.xml b/addons/sale_timesheet/views/project_task_views.xml index 2830d97593f..483606e6b4e 100644 --- a/addons/sale_timesheet/views/project_task_views.xml +++ b/addons/sale_timesheet/views/project_task_views.xml @@ -188,15 +188,13 @@ project.task - - {'with_remaining_hours': True, 'with_price_unit': True} + + {'create': False, 'edit': False, 'delete': False, 'with_price_unit': True, 'with_remaining_hours': True} + {'invisible': [('allow_billable', '=', False)]} - - 1 -