Repository navigation
Conversation
Contributor
Odoo 20.0 adds its own "My Attendances" in the Attendances app, so the
module drops its copy, as the product owner decided:
- remove the "My Attendances" and "Check In / Check Out" menus, their
action and the list view with "Service Hours" (current_worked_hours)
- remove the context override on hr_attendance.hr_attendance_action: it
asked for search_default_my_attendances, a filter that does not exist
(it is called myattendances), and it replaced the whole core context,
so the default grouping of the core was lost. The -u of hr_attendance
puts the core context back
- hours suggestion on a timesheet: compute the attended time inline and
subtract the new break_duration of 20.0
- task domain: add ('has_template_ancestor', '=', False). The native
domain has it since 19.0 and the module lost it when it replaced the
domain, so template tasks were offered
- My Timesheet / Attendance pivot: drop search_default_user_id, the
report has no user_id field
…on and task filter
…e the module name
…imesheets
The module replaces the task_id domain, and with it the condition
('is_timeoff_task', '=', False) that project_timesheet_holidays adds
(auto installed with hr_timesheet and hr_holidays). The module loads
after it, so the time off task was offered, and saving a timesheet on
it raised a UserError. Already the case in 19.0.
The domain is now built by a method, which adds the condition only when
project_timesheet_holidays is installed.
…pany
The task domain had ('company_id', '=', company_id), so a timesheet did
not offer the tasks of a project without company, which is valid. The
native domain has no company condition (and task_id has no
check_company), so the module now follows it. Already the case in 19.0.
…ttendances
Product owner decisions for the migration to 20.0:
- In 20.0 hr.timesheet.attendance.report is readable only by timesheet
managers, so the "My Timesheet / Attendance" pivot disappeared for
timesheet users and approvers. Give timesheet users read access to their
own lines again, with the domain of the 19.0 user rule
([('employee_id', '=', user.employee_id.id)]). Approvers and managers
get it through their implied groups.
- Attendances have a state in 20.0. The hours suggestion of a timesheet
leaves the refused ones out, as the core does for the time rules.
Tests cover both, and each one was seen failing with the change undone.
README and translation terms updated.
les-adhoc
force-pushed
the
20.0-t-76492-les
branch
from
November 11, 2026 14:22
cfd06dc to
c494e32
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Task: https://www.adhoc.inc/odoo/project.task/76492
Migration of
hr_timesheet_attendance_uxfrom 19.0 to 20.0.What changes
odoo-module-migrator+upgrade_codeof Odoo 20.0, which changed nothing): version20.0.1.0.0,installable: True.current_worked_hours) and the context override onhr_attendance.hr_attendance_action. The-uofhr_attendanceputs the core context back.break_durationof 20.0. Open attendances still count up to now. The day is cut in the user's timezone, as in 19.0.('has_template_ancestor', '=', False), which the native domain has since 19.0 and the module lost when it replaced it. Template tasks are not offered any more.project_timesheet_holidaystoo, so the time off task was offered and saving a timesheet on it raised aUserError(already in 19.0). The domain is now built by a method that adds('is_timeoff_task', '=', False)when that module is installed.search_default_user_id, the report has nouser_idfield.security/ir.access.csv, same domain as the 19.0 user rule). Approvers and managers get it through their implied groups.stateis new in 20.0). The native report behind the pivot still counts them.es.poupdated. The module description (the README) is left untranslated.dependsandauto_installdo not change. The license stays AGPL-3 (no Enterprise dependency).Tests
The module had no tests in 19.0, so this is migrated without a regression net. Three new tests for the 20.0 code:
project_timesheet_holidaysis installed);Each one was seen failing by breaking the code on purpose. Run locally on a 20.0 database with
project_timesheet_holidays:0 failed, 0 error(s) of 3 tests(the first two were also run without it).Data migration
No script needed: the only field removed (
current_worked_hours) is computed and not stored; the menus, action and view are removed by the-u.Not tested on a real upgraded database: runbot does not run the 19.0 → 20.0 upgrade yet.