From 1167fc1673637436d767a43819deb066592cff0c Mon Sep 17 00:00:00 2001 From: Pawan Kumar Date: Wed, 7 Apr 2021 10:53:46 +0530 Subject: [PATCH] sort hours within date --- cor_custom/models/analytic.py | 2 ++ project_report/report/project_timesheet_report.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cor_custom/models/analytic.py b/cor_custom/models/analytic.py index c20d34d..8525e0f 100755 --- a/cor_custom/models/analytic.py +++ b/cor_custom/models/analytic.py @@ -13,6 +13,8 @@ import dateutil.parser class AccountAnalyticLine(models.Model): _inherit = 'account.analytic.line' + #_order = 'date desc, id desc' + _order = 'start_datetime desc, unit_amount' @api.depends('project_id', 'employee_id') def name_get(self): diff --git a/project_report/report/project_timesheet_report.py b/project_report/report/project_timesheet_report.py index b59bea0..466d755 100755 --- a/project_report/report/project_timesheet_report.py +++ b/project_report/report/project_timesheet_report.py @@ -9,7 +9,7 @@ class ProjectTimelineReport(models.Model): _name = "project.timesheet.report" _description = "Project Timesheet Report" - _order = 'start_date desc, duration desc' + _order = 'start_date desc, duration desc, project_id desc' _auto = False start_date = fields.Date(string='Start Time', readonly=True)