This module provides functionality for defining custom warning criteria related to Timesheet Sheets using Python expressions. Users can establish specific conditions for evaluating certain aspects of the Sheets. Once the warnings are defined, the module facilitates a systematic evaluation of Timesheet Sheets against these conditions. It generates individual warnings for each Sheet, if the warnings criteria are met.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Lets you define custom warning rules for Timesheet Sheets using a Python expression and an optional filter, then automatically flags sheets that match those rules. Warnings appear on the sheet and can be used to filter sheets with or without warnings.
This module adds a configurable warning system on top of Timesheet Sheets. Approvers can create warning definitions under the Timesheet configuration menu, giving each one a description, an optional applicability filter (a domain on Timesheet Sheets), and a Python expression that must return true or false. A definition can be deactivated, in which case it no longer raises warnings.
On a Timesheet Sheet, a new Warnings tab shows the warnings raised for that sheet and a Generate Warnings button, available while the sheet is in new or draft state. When the sheet is confirmed, warnings are generated automatically before the standard confirmation runs.
Generation works by checking every definition against the sheet: if the applicability filter matches and the expression evaluates to true, a warning item is created; if the condition no longer holds, the existing warning is removed. Each warning is unique per sheet and definition, and warning items follow the company of their sheet, with a multi-company rule restricting visibility.
The Timesheet Sheet list view gains With Warnings and Without Warnings filters. Timesheet users can read definitions and manage warning items; approvers can create, edit and delete definitions. If a warning expression fails to evaluate, an error message is shown.
Depends on
Menus it adds
Models and fields (3)
- hr_timesheet.sheet · extends an existing modelhr_timesheet_sheet_warning_item_ids
- hr_timesheet.sheet.warning.item · new modelname, sheet_id, company_id, warning_definition_id
- hr_timesheet.sheet.warning.definition · new modelname (Description), active, python_code (Warning Expression), warning_domain (Applicable Domain)
Text generated by AI (DeepSeek) from reading the Odoo 18.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-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/timesheet.
terminal Installation and usage
OCA documentation · Odoo 18.0Installation
Source · Odoo 18.0This module relies on:
- The OCA module '2D matrix for x2many fields', and can be downloaded from Github:
Usage
Source · Odoo 18.0In order to create warning definitions for Timesheet Sheets, you need to go:
- In the menu Configuration -\> Warnings, and start creating a new instance of a warning definition.
- Once inside, you will be able to specify the domain of the warning (the Timesheet Sheets it will be checked against) and the warning expression (the Python code that will be run and, if it evaluates to true, will indicate that a warning should be raised for that specific Sheet), amongst other fields.
To run those checks and raise the necessary warnings for a specific Timesheet Sheet, you need to go:
- When looking at a Timesheet Sheet, go to the 'Warnings' tab.
- There you can press the button 'Generate Warnings', and you will be able to see the generated warnings in the list below the button.
- Warnings are also automatically generated when a Timesheet Sheet is submitted to the reviewer.
No verified information in OCA: Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
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.