Skip to content

[20.0][MIG] hr_timesheet_begin_end: Migration to 20.0 (review of OCA/timesheet#983) - #2

Open
weinni2000 wants to merge 5 commits into
20.0-mig-hr_timesheet_begin_end-basefrom
20.0-mig-hr_timesheet_begin_end
Open

weinni2000 wants to merge 5 commits into
20.0-mig-hr_timesheet_begin_end-basefrom
20.0-mig-hr_timesheet_begin_end

Conversation

@weinni2000

@weinni2000 weinni2000 commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Review diff for OCA#983: only the [MIG] commit (f27e652), compared against the state after the pre-commit auto fixes commit (5e9d76d).

🤖 Generated with Claude Code

Summary by Sourcery

Migrate hr_timesheet_begin_end to Odoo 20.0 and align its timesheet validation, views, tests, and documentation with the new platform version.

Enhancements:

  • Migrate the hr_timesheet_begin_end module to Odoo 20.0, updating its metadata, views, validation behavior, and analytic-account test setup for the new platform APIs.
  • Preserve begin/end time tracking across timesheet and project task views while respecting timesheet read-only settings.

Documentation:

  • Update the module documentation, generated README, translations template, and contributor information for the 20.0 release.

Tests:

  • Adapt tests to create analytic plans and accounts compatible with the 20.0 timesheet model.

@sourcery-ai

sourcery-ai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Sorry @weinni2000, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 4 days and 23 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Adapt duration comparison to the Odoo 20.0 unit API and validate overlapping times by employee, while preserving the existing timesheet validations.

  • hr_timesheet_begin_end/models/account_analytic_line.py L27-42 (+4 small edits)

UI

Update the timesheet and task views to use the current view structure and honor the timesheet readonly modifier for begin/end fields.

  • hr_timesheet_begin_end/views/project_task_views.xml L1-42
  • hr_timesheet_begin_end/views/project_task.xml (deleted)

Configuration

Bump the module version and register the renamed 20.0 view files.

  • hr_timesheet_begin_end/__manifest__.py L7, L13

Documentation

Revise the module documentation and contributor information for the 20.0 release.

  • hr_timesheet_begin_end/README.rst L1-4, L20-30, L68-82 (+4 small edits)
  • hr_timesheet_begin_end/readme/CONTRIBUTORS.md L9-11
  • hr_timesheet_begin_end/readme/DESCRIPTION.md L2-3

Tests

Update test setup to create an analytic plan and account using the current analytic model structure.

  • hr_timesheet_begin_end/tests/test_timesheet_begin_end.py L14-26

Lock files and vendored code

Regenerate the translation template and rendered module description for the 20.0 documentation and metadata.

  • hr_timesheet_begin_end/i18n/hr_timesheet_begin_end.pot L26-30, L36-40 (+4 small edits)
  • hr_timesheet_begin_end/static/description/index.html L363-370, L395-405, L426-441 (+6 small edits)

Other changes

Files not grouped.

  • hr_timesheet_begin_end/views/hr_analytic_timesheet.xml L1, L9-20, L32-41

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@weinni2000
weinni2000 force-pushed the 20.0-mig-hr_timesheet_begin_end branch 2 times, most recently from 61567e4 to f0607c9 Compare November 2, 2026 14:49
@weinni2000
weinni2000 force-pushed the 20.0-mig-hr_timesheet_begin_end-base branch from 5e9d76d to e179165 Compare November 2, 2026 14:51
BhaveshHeliconia and others added 5 commits November 8, 2026 15:26
The validation for overlapping times was done on user_id, which is the user entering the lines. This should be on employee_id, the employee *for who* the times are entered.
Odoo 20 removes uom.uom.rounding. Use the unit comparison API to keep
duration validation consistent with Product Unit precision.

Upstream:
odoo/odoo@9a4ad7c
@weinni2000
weinni2000 force-pushed the 20.0-mig-hr_timesheet_begin_end branch from f0607c9 to 804b7b8 Compare November 8, 2026 14:31

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants