Skip to content
Snippets Groups Projects
Commit 0931807d authored by Kartik Chavda's avatar Kartik Chavda
Browse files

[FIX] hr_timesheet_attendance: fix the timesheet attendance report

Attendance report is calculated from the timesheets of all the companies
when multi-company is enabled but only one company is allowed. This commit fixes it.

Steps to reproduce:
 - Create two companies
 - Create an employee with a user allowed in both companies
 - Create timesheets in both companies for that employee
 - Allow only one of the two companies
 - Check the Timesheet Attendance report -> timesheets from both companies are counted

This issue arrived from this commit:
https://github.com/odoo/odoo/commit/c69fe38b946089919c8939bbd9d1adc2602ddd2c



task-2782768

closes odoo/odoo#93172

Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
parent 5ce0b021
Branches
Tags
No related merge requests found
......@@ -45,7 +45,7 @@ class TimesheetAttendance(models.Model):
NULL AS attendance,
ts.unit_amount AS timesheet,
ts.date AS date,
NULL AS company_id
ts.company_id AS company_id
FROM account_analytic_line AS ts
WHERE ts.project_id IS NOT NULL
) AS t
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment