@@ -27,7 +27,7 @@
graph
-
+
@@ -52,11 +52,33 @@
+
+ account.analytic.line.pivot
+ account.analytic.line
+
+ primary
+
+
+
+
+
+
+
+
+ account.analytic.line.graph
+ account.analytic.line
+
+ primary
+
+
+
+
+
Timesheets by Project
account.analytic.line
[('project_id', '!=', False)]
- {'search_default_groupby_project': 1, 'grid_range': 'week'}
+ {'grid_range': 'week'}
@@ -71,14 +93,14 @@
pivot
-
+
graph
-
+
@@ -103,11 +125,35 @@
+
+ account.analytic.line.pivot
+ account.analytic.line
+
+ primary
+
+
+
+
+
+
+
+
+ account.analytic.line.graph
+ account.analytic.line
+
+ primary
+
+
+
+
+
+
+
Timesheets by Task
account.analytic.line
[('project_id', '!=', False)]
- {'search_default_groupby_project':1,'search_default_groupby_task':1, 'grid_range': 'week'}
+ {'grid_range': 'week'}
@@ -122,14 +168,14 @@
pivot
-
+
graph
-
+
diff --git a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py
index 6601412fbad..18f1ef1bd2f 100644
--- a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py
+++ b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py
@@ -53,3 +53,11 @@ class TimesheetAttendance(models.Model):
ORDER BY t.date
)
""" % self._table)
+
+ @api.model
+ def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
+ if not orderby and groupby:
+ orderby_list = [groupby] if isinstance(groupby, str) else groupby
+ orderby_list = [field.split(':')[0] for field in orderby_list]
+ orderby = ','.join([f"{field} desc" if field == 'date' else field for field in orderby_list])
+ return super().read_group(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
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 7417652c995..a66c4f12576 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
@@ -45,6 +45,7 @@
hr.timesheet.attendance.report
+
@@ -54,8 +55,8 @@
Timesheet / Attendance
hr.timesheet.attendance.report
graph,pivot
-
- {'search_default_group_by_month': True}
+
+ {}
No data yet!
@@ -65,6 +66,13 @@
+
+
+ pivot
+
+
+
+
graph
diff --git a/addons/sale_timesheet/models/account.py b/addons/sale_timesheet/models/account.py
index 15579ef4b90..5728e609289 100644
--- a/addons/sale_timesheet/models/account.py
+++ b/addons/sale_timesheet/models/account.py
@@ -23,7 +23,7 @@ class AccountAnalyticLine(models.Model):
('timesheet_revenues', 'Timesheet Revenues'),
('service_revenues', 'Service Revenues'),
('other_revenues', 'Other Revenues'),
- ('other_costs', 'Other Costs')], string="Billable Type",
+ ('other_costs', 'Other Costs')], string="Billing Type",
compute='_compute_timesheet_invoice_type', compute_sudo=True, store=True, readonly=True)
commercial_partner_id = fields.Many2one('res.partner', compute="_compute_commercial_partner")
timesheet_invoice_id = fields.Many2one('account.move', string="Invoice", readonly=True, copy=False, help="Invoice created from the timesheet")
diff --git a/addons/sale_timesheet/views/hr_timesheet_views.xml b/addons/sale_timesheet/views/hr_timesheet_views.xml
index 9d9d1c4f931..aa3c7960f92 100644
--- a/addons/sale_timesheet/views/hr_timesheet_views.xml
+++ b/addons/sale_timesheet/views/hr_timesheet_views.xml
@@ -20,7 +20,7 @@
-
+
@@ -181,7 +181,6 @@