OdooWiki OCA HUB

HR Timesheet Sheet Restriction

hr_timesheet_time_restriction folder_open OCA/timesheet open_in_new
Human Resources License: AGPL-3

This app restricts user from creating timesheets for past dates (or changing date of timesheet to a past date) based on project configuration or global restriction settings.

Use case is to make sure that new timesheets are not added to a specific time range after that period has been reported and/or billed.

In user, it's possible to activate flag "No timesheet date restriction" to override behavior.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

This module stops users from entering or backdating timesheets beyond a set number of days, either globally or per project. A special user group can bypass the restriction.

This module adds date limits to timesheet entries so that staff cannot add or move time to dates that are too far in the past.

  • In Settings, under Timesheets, you can turn on "Auto-enable Timesheet restriction" and set a number of days. This becomes the default limit for all projects.
  • On each project form, in the time management section, you can enable "Use timesheet restriction" and set a project-specific number of days. If the project value is left at 0, the global number is used.
  • When a timesheet line is saved, Odoo checks its date against the allowed limit. If the date is older than allowed, saving is blocked with an error message. When the limit is 0, only today's date is accepted.
  • Users who belong to the "No Timesheet Date Restriction" group can ignore these checks. Unauthorized attempts are logged as warnings.
  • Negative day values are rejected: the settings screen resets them to 0 with a warning, and project records raise an error if the global restriction is active.

The module touches timesheet lines (account.analytic.line), projects (project.project) and the general settings screen (res.config.settings).

Depends on

hr_timesheet
Models and fields (3)
  • project.project · extends an existing modeluse_timesheet_restriction, timesheet_restriction_days
  • res.config.settings · extends an existing modeluse_timesheet_restriction, timesheet_restriction_days
  • account.analytic.line · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 14.0

Confirmed on 2026-11-03 in branch 14.0 of OCA/timesheet.

terminal Installation and usage

OCA documentation · Odoo 16.0

Specific project timesheet restriction:

  • Project > Configuration > Projects > open project > enable "Use timesheet restriction" and set "Timesheet Restriction (days)"

Global timesheet restriction:

  • Timesheets > Configuration > Settings > enable "Use timesheet restriction" and set "Timesheet Restriction (days)" (note: it will only apply to newly created projects)

Ignore user timesheet restriction:

  • Settings > Users & Companies > Users > open user > Technical: set "No Timesheet Date Restriction"

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.