Skip to content
Snippets Groups Projects
Commit 2e147720 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#94232

X-original-commit: 0931807d
Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
parent 209d888f
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,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
LEFT JOIN hr_employee ON hr_employee.id = ts.employee_id
WHERE ts.project_id IS NOT NULL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment