From f45714d12e5686dc8cb424404d87e9625c2e5a36 Mon Sep 17 00:00:00 2001 From: "Nasreddin (bon)" Date: Wed, 16 Sep 2020 14:40:18 +0000 Subject: [PATCH] [FIX] hr_timesheet: default employee not set on timesheet Issue - Install 'hr_timesheet' module - Go to any employee and click on stat button 'Timesheets' - Create timesheet - Remove employee from filter then add it back No timesheets displayed for current employee. Cause There is no "employee_id" in list view. However, 'timesheet_view_tree_user' view (who inherit from concerned list view) does have an "employee_id" field but the mode is "primary" and therefore not available for the main view. Solution Add "employee_id" in main list view and alter inherited view to update attributes of "employee_id" field. opw-2338055 closes odoo/odoo#57930 X-original-commit: cae352a90b2d8a562fbf57391ce88fde4488e8cf Signed-off-by: bon-odoo --- addons/hr_timesheet/views/hr_timesheet_views.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/hr_timesheet/views/hr_timesheet_views.xml b/addons/hr_timesheet/views/hr_timesheet_views.xml index a0a8b9b8b10..d2b6f57ade5 100644 --- a/addons/hr_timesheet/views/hr_timesheet_views.xml +++ b/addons/hr_timesheet/views/hr_timesheet_views.xml @@ -23,6 +23,7 @@ + @@ -40,8 +41,10 @@ primary 10 - - + + 0 + 1 + many2one_avatar_employee