TIP: You can type at any time to perform a new search.
Theoretical vs Attended Time Analysis
hr_attendance_report_theoretical_time · OCA/hr-attendance
- Repository
- OCA/hr-attendance · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Human Resources
- Folder size
- 0.2 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/hr-attendance
- Last tracking update
- 2026-08-07 09:06:27
- Authors
- Odoo Community Association (OCA), Tecnativa
- Maintainers
- Odoo Community Association (OCA), Tecnativa
- Committers
- Víctor Martínez, Weblate, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- openupgradelib
- System dependencies
- None
- Required by
- None
- Description
This module adds a new report called "Theoretical vs Attended Time Analysis" that compares worked time, measured through attendances records, with the theoretical time, computed from employee's working calendar, public holidays and employee specific leaves. Missing attendance days are generated on the fly in the report with their corresponding theoretical hours. There is the possibility of counting as theoretical time some leave types if specified in them. As an example, imagine a work week with 40 theoretical hours, and these attendance situation: - Monday: Worked 10 hours - Tuesday: Worked 10 hours - Wednesday: Worked 10 hours - Thursday: Worked 10 hours - Friday: Ask for a compensation leave (said leave type), as already worked 40 hours. On the report, whole week should put 40 theoretical hours - 8 per day - against 40 worked hours (although they were on previous days, and none on Friday). On contrary, if you want to take a holiday one of that days, you should ask for a leave type without the check for counting as theoretical time, and then the whole week will be 32 theoretical hours against the worked hours of that week without the leave.
Code Analysis ⓘ
Views touched (8)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
edit_holiday_status_form |
hr.leave.type | form | Inherits hr_holidays.edit_holiday_status_form | |
hr_attendance_theoretical_view_filter |
hr.attendance.theoretical.time.report | search | New | |
hr_attendance_theoretical_view_graph |
hr.attendance.theoretical.time.report | graph | New | |
hr_attendance_theoretical_view_pivot |
hr.attendance.theoretical.time.report | pivot | New | |
hr_attendance_view_pivot |
hr.attendance.pivot - Don't show "Theoretical hours" measure | hr.attendance | pivot | Inherits hr_attendance.hr_attendance_view_pivot |
recompute_theoretical_attendance_form |
recompute.theoretical.attendance | form | New | |
view_employee_form_inherit_hr_attendance |
hr.employee | form | Inherits hr.view_employee_form | |
wizard_theoretical_time_form_view |
wizard.theoretical.time.form (in hr_attendance_report_theoretical_time) | wizard.theoretical.time | form | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (10)
New fields (0)
No new fields.
Public methods (2)-
create(self, vals_list)@api.model_create_multiTrigger recomputation for the date of the new lines. -
write(self, vals)If the date of a line is changed, we first recompute hours of the previous date, and then the theoretical hours of the current date.
New fields (2)
-
activeBooleandefault=True -
theoretical_hoursFloatcompute='_compute_theoretical_hours'compute_sudo=Truestore=True
-
action_create_empty_attendance(self, limit_date_from=False, limit_date_to=False)Method for creating inactive attendance records with a duration of 0. The goal is to prevent the report from having to calculate data directly, so employee attendance records are created for past days when they should have clocked in.
New fields (7)
-
company_idMany2onerelated='employee_id.company_id' -
dateDatereadonly=True -
department_idMany2one → hr.departmentcomodel_name='hr.department'readonly=Truerelated='employee_id.department_id'string='Department' -
differenceFloatreadonly=True -
employee_idMany2one → hr.employeecomodel_name='hr.employee'readonly=Truestring='Employee' -
theoretical_hoursFloatreadonly=Truestring='Theoric' -
worked_hoursFloatreadonly=Truestring='Worked'
-
init(self)
New fields (1)
-
theoretical_hours_start_dateDatehelp='Fill this field for setting a manual start date for computing the theoretical hours independently from the attendances. If not filled, employee creation date or the calendar start date will be used (the greatest of both).'
No public methods.
New fields (1)
-
theoretical_hours_start_dateDatehelp='Fill this field for setting a manual start date for computing the theoretical hours independently from the attendances. If not filled, employee creation date or the calendar start date will be used (the greatest of both).'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
include_in_theoreticalBooleanhelp="If you check this mark, leaves in this category won't reduce the number of theoretical hours in the attendance report."string='Include in theoretical hours'
No public methods.
New fields (3)
-
date_fromDatetimehelp='Recompute attendances from this date'required=Truestring='From' -
date_toDatetimehelp='Recompute attendances up to this date'required=Truestring='To' -
employee_idsMany2many → hr.employeecomodel_name='hr.employee'help='Recompute these employees attendances'required=Truestring='Employees'
-
action_recompute(self)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (3)
-
category_idsMany2many → hr.employee.categorycomodel_name='hr.employee.category'string='Tag' -
department_idMany2one → hr.departmentcomodel_name='hr.department'string='Department' -
employee_idsMany2many → hr.employeecomodel_name='hr.employee'string='Employees'
-
default_get(self, fields)@api.model -
populate(self) -
view_report(self)
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…