Employee Calendar Planning
hr_employee_calendar_planning · OCA/hr
hr_holidays_calendar_planning (19.0)-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by15/251 module depends on it
-
Maturity25/25In 10 Odoo series since 10.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE resource_calendar SET stored_flexible_hours = flexible_hours, stored_full_time_required_hours = full_time_required_hours, stored_hours_per_day = hours_per_day, stored_hours_per_week = hours_per_week` - re-check the table/column names still match after upgrading. (2 occurrences in this file) migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module allows to manage employee working time with profiles by date intervals.
The profiles are regular working time calendars, but they are treated as master ones here, allowing you to compose complexes working times by dates.
Under the hook, a unique working time is created for each employee with the proper composition for not affecting the rest of the functionality linked to this model.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
resource_calendar_form |
resource.calendar | form | Inherits resource.resource_calendar_form | |
view_employee_form |
hr.employee | form | Inherits hr.view_employee_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
-
calendar_idsOne2many → hr.employee.calendarcomodel_name='hr.employee.calendar'copy=Truegroups='hr.group_hr_user'inverse_name='employee_id'string='Calendar planning'
-
copy(self, default=None) -
copy_global_leaves(self) -
create(self, vals_list)@api.model_create_multi -
default_get(self, fields)@api.modelSet calendar_ids default value to cover all use cases. -
regenerate_calendar(self)
-
calendar_idMany2one → resource.calendarcheck_company=Truecomodel_name='resource.calendar'ondelete='restrict'required=Truestring='Working Time' -
company_idMany2onerelated='employee_id.company_id' -
date_endDatestring='End Date' -
date_startDatestring='Start Date' -
employee_idMany2one → hr.employeecomodel_name='hr.employee'ondelete='cascade'required=True
-
create(self, vals)@api.model_create_multi -
unlink(self) -
write(self, vals)
-
is_flexibleBooleancompute_sudo=Truesearch='_search_is_flexible'store=False -
is_fully_flexibleBooleancompute='_compute_is_fully_flexible' -
stored_is_flexibleBooleancompute='_compute_stored_is_flexible'groups='hr.group_hr_user'store=True
No public methods.
-
activeBooleandefault=True -
auto_generateBoolean -
employee_calendar_idsOne2many → hr.employee.calendarargs: 'hr.employee.calendar', 'calendar_id' -
employee_idsOne2many → hr.employeeargs: 'hr.employee', 'resource_calendar_id' -
flexible_hoursBooleansearch='_search_flexible_hours'store=False -
full_time_required_hoursFloatsearch='_search_full_time_required_hours'store=False -
hours_per_dayFloatsearch='_search_hours_per_day'store=False -
hours_per_weekFloatsearch='_search_hours_per_week'store=False -
stored_flexible_hoursBooleancompute='_compute_stored_flexible_hours'help="When enabled, it will allow employees to work flexibly, without relying on the company's working schedule (working hours)."store=True -
stored_full_time_required_hoursFloatcompute='_compute_stored_full_time_required_hours'help='Number of hours to work on the company schedule to be considered as fulltime.'store=True -
stored_hours_per_dayFloatcompute='_compute_stored_hours_per_day'digits=(2, 2)help='Average hours per day a resource is supposed to work with this calendar.'readonly=Falsestore=True -
stored_hours_per_weekFloatcompute='_compute_stored_hours_per_week'readonly=Falsestore=True
-
create(self, vals)@api.model_create_multi -
write(self, vals)
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…