HR Timesheet Sheet Warning

hr_timesheet_sheet_warning
REPOSITORY
REPOSITORYOCA/timesheet
GIT
GIThttps://github.com/OCA/timesheet.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/timesheet/tree/18.0/hr_timesheet_sheet_warning
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYHuman Resources
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ForgeFlow
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ForgeFlow
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, JasminSForgeFlow
WEBSITE
WEBSITEhttps://github.com/OCA/timesheet
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:17
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/timesheet:
    - hr_timesheet_sheet
OCA/web:
    - web_widget_x2many_2d_matrix
odoo/odoo:
    - hr_timesheet
    - hr
    - base_setup
    - base
    - web
    - digest
    - mail
    - bus
    - web_tour
    - html_editor
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - phone_validation
    - resource_mail
    - hr_hourly_cost
    - analytic
    - uom
    - project
    - rating
    - sale_timesheet
    - sale_project
    - sale_management
    - sale
    - sales_team
    - account_payment
    - account
    - onboarding
    - product
    - payment
    - utm
    - sale_service
    - project_account
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
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.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
hr_timesheet_sheet_form hr_timesheet.sheet.form - hr_timesheet_sheet_warning hr_timesheet.sheet xpath Inherits hr_timesheet_sheet.hr_timesheet_sheet_form
hr_timesheet_sheet_warning_definition_form hr_timesheet.sheet.warning.definition.form hr_timesheet.sheet.warning.definition form New
hr_timesheet_sheet_warning_definition_search hr_timesheet.sheet.warning.definition.search hr_timesheet.sheet.warning.definition search New
hr_timesheet_sheet_warning_definition_tree hr_timesheet.sheet.warning.definition.tree hr_timesheet.sheet.warning.definition list New
hr_timesheet_sheet_warning_item_tree hr_timesheet.sheet.warning.item.tree hr_timesheet.sheet.warning.item list New
view_hr_timesheet_sheet_filter hr_timesheet.sheet.filter - hr_timesheet_sheet_warning hr_timesheet.sheet xpath Inherits hr_timesheet_sheet.view_hr_timesheet_sheet_filter
Models touched (3)

New fields (1)
  • hr_timesheet_sheet_warning_item_ids One2many → hr_timesheet.sheet.warning.item
    comodel_name='hr_timesheet.sheet.warning.item' inverse_name='sheet_id' readonly=True
Public methods (2)
  • action_generate_warnings(self)
  • action_timesheet_confirm(self)

New fields (4)
  • active Boolean
    default=True
  • name Char
    required=True string='Description'
  • python_code Text
    default='# Available local variables:\n# - sheet: A hr_timesheet.sheet record\nTrue' help='Write Python code that defines when this warning should raise. The result of executing the expression must be a boolean.' string='Warning Expression'
  • warning_domain Char
    default='[]' help='Domain based on Timesheet Sheet, to define if the warning is applicable or not.' string='Applicable Domain'
Public methods (2)
  • evaluate_definition(self, sheet)
  • is_warning_applicable(self, sheet)

New fields (4)
  • company_id Many2one
    related='sheet_id.company_id' store=True
  • name Char
    compute='_compute_name'
  • sheet_id Many2one → hr_timesheet.sheet
    comodel_name='hr_timesheet.sheet' ondelete='cascade'
  • warning_definition_id Many2one → hr_timesheet.sheet.warning.definition
    comodel_name='hr_timesheet.sheet.warning.definition'
Public methods (0)

No public methods.