From ffe324877d6ff2817aefc3a324347280d9cd8039 Mon Sep 17 00:00:00 2001 From: jbm-odoo Date: Wed, 4 Dec 2019 14:51:43 +0000 Subject: [PATCH] [IMP] timesheet: Improve timesheet report Some small improvements in timesheet report view. In measures of graph, take string attribute into account. closes odoo/odoo#41348 Taskid: 2149371 Related: odoo/enterprise#7041 Signed-off-by: Yannick Tivisse (yti) --- .../report/hr_timesheet_report_view.xml | 5 +- .../hr_timesheet/views/hr_timesheet_views.xml | 6 ++- .../hr_timesheet_attendance_report_view.xml | 4 +- .../views/hr_timesheet_views.xml | 50 +++++++++++++------ .../static/src/js/views/graph/graph_view.js | 11 ++++ 5 files changed, 57 insertions(+), 19 deletions(-) diff --git a/addons/hr_timesheet/report/hr_timesheet_report_view.xml b/addons/hr_timesheet/report/hr_timesheet_report_view.xml index 668ffd7c62c..2641008d457 100644 --- a/addons/hr_timesheet/report/hr_timesheet_report_view.xml +++ b/addons/hr_timesheet/report/hr_timesheet_report_view.xml @@ -50,7 +50,10 @@ Timesheets By Project account.analytic.line [('project_id', '!=', False)] - {'search_default_groupby_project':1,} + { + 'search_default_groupby_project': 1, + 'search_default_groupby_employee': 1, + }

diff --git a/addons/hr_timesheet/views/hr_timesheet_views.xml b/addons/hr_timesheet/views/hr_timesheet_views.xml index d81fee4d186..d6e08e50b1e 100644 --- a/addons/hr_timesheet/views/hr_timesheet_views.xml +++ b/addons/hr_timesheet/views/hr_timesheet_views.xml @@ -57,6 +57,7 @@ + @@ -69,6 +70,7 @@ + @@ -122,6 +124,7 @@ + @@ -129,10 +132,11 @@ - + + diff --git a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml index 6d868f15c50..93d86d4fa3e 100644 --- a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml +++ b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml @@ -16,8 +16,7 @@ hr.timesheet.attendance.report - - + @@ -29,6 +28,7 @@ HR Timesheet/Attendance Report hr.timesheet.attendance.report pivot + {'search_default_week': True} diff --git a/addons/sale_timesheet/views/hr_timesheet_views.xml b/addons/sale_timesheet/views/hr_timesheet_views.xml index f12b430162c..b0de9fe0ff8 100644 --- a/addons/sale_timesheet/views/hr_timesheet_views.xml +++ b/addons/sale_timesheet/views/hr_timesheet_views.xml @@ -6,12 +6,18 @@ account.analytic.line + + + + + + @@ -55,32 +61,46 @@ Reporting --> - Timesheets By Billing Rate + Timesheets By Billing Type account.analytic.line pivot,graph [('project_id', '!=', False)] - {"search_default_week":1} + { + 'search_default_groupby_date': 1, + } - - Billing Rate - account.analytic.line - - [('project_id', '!=', False)] - - { - 'col_group_by': ['date:month', 'timesheet_invoice_type'], - 'group_by': ['project_id', 'employee_id'], - 'measures': ['amount_currency', 'unit_amount', '__count'] - } - + + account.analytic.line.pivot.billing.rate + account.analytic.line + + + + + + + + + + + + pivot + + + + + + + graph + +