[ADD]hr_employee_stats_sheet

This commit is contained in:
2025-02-12 11:49:51 +01:00
committed by Stéphan Sainléger
parent 735a223c33
commit 098edfe838
18 changed files with 874 additions and 0 deletions

View File

@@ -0,0 +1 @@
from . import hr_employee_stats

View File

@@ -0,0 +1,14 @@
from odoo import models
class HrEmployeeStats(models.Model):
_inherit = "hr.employee.stats"
def get_total_hours_domain(self):
'''
if project_timesheet_holidays is installed, exclude timesheet generated from holidays to calculated total hours
'''
domain = super().get_total_hours_domain()
if self.env.company.leave_timesheet_task_id:
domain.append(("task_id", "!=", self.env.company.leave_timesheet_task_id.id),)
return domain