Repository
OCA/timesheet · module folder · Try on Runboat
Module version
1.3.2
Category
Human Resources
Folder size
3.32 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/timesheet
Last tracking update
2026-08-07 08:43:00
Authors
Odoo Community Association (OCA), Onestein, ForgeFlow, CorporateHub
Maintainers
Odoo Community Association (OCA), Onestein, ForgeFlow, CorporateHub
Committers
Miquel Raïch, Víctor Martínez, JordiMForgeFlow, Saran440, Weblate, Ricard Calvo, OCA-git-bot, oca-ci, Borruso, yostashiro
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
hr_timesheet_sheet_attendance, hr_timesheet_sheet_autodraft, hr_timesheet_sheet_policy_project_manager, hr_timesheet_sheet_warning
Description
This module supplies a new screen enabling you to manage your work
encoding (timesheet) by period. Timesheet entries are made by employees
each day. At the end of the defined period, employees submit their
validated sheet and the reviewer must then approve submitted entries.
Periods are defined in the company forms and you can set them to run
monthly, weekly or daily. By default, policy is configured to have HR
Officers as reviewers.

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
hr_department_view_kanban hr.department.kanban.inherit hr.department kanban Inherits hr.hr_department_view_kanban
hr_timesheet_line_form account.analytic.line.form account.analytic.line form Inherits hr_timesheet.hr_timesheet_line_form
hr_timesheet_line_search account.analytic.line.search account.analytic.line search Inherits hr_timesheet.hr_timesheet_line_search
hr_timesheet_sheet_employee_extd_form hr.timesheet.sheet.employee.extd_form hr.employee form Inherits hr.view_employee_form
hr_timesheet_sheet_form hr_timesheet.sheet.form hr_timesheet.sheet form New
hr_timesheet_sheet_form_my hr.timesheet.sheet.form.my hr_timesheet.sheet form Inherits hr_timesheet_sheet_form
hr_timesheet_sheet_tree hr.timesheet.sheet.list hr_timesheet.sheet list New
hr_timesheet_sheet_tree_my hr.timesheet.sheet.list.my hr_timesheet.sheet list Inherits hr_timesheet_sheet_tree
res_config_settings_view_form res.config.settings.view.form.inherit.hr.timesheet res.config.settings form Inherits hr_timesheet.res_config_settings_view_form
view_hr_timesheet_sheet_filter hr_timesheet.sheet.filter hr_timesheet.sheet search New
view_hr_timesheet_sheet_kanban hr_timesheet.sheet.kanban hr_timesheet.sheet kanban New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (11)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • sheet_id Many2one → hr_timesheet.sheet
    comodel_name='hr_timesheet.sheet' string='Sheet'
  • sheet_state Selection
    related='sheet_id.state' string='Sheet State'
Public methods (4)
  • create(self, values)
    @api.model_create_multi
  • merge_timesheets(self)
  • unlink(self)
  • write(self, values)

New fields (1)
  • timesheet_sheet_to_approve_count Integer
    compute='_compute_timesheet_to_approve' string='Timesheet Sheets to Approve'
Public methods (0)

No public methods.

New fields (2)
  • timesheet_sheet_count Integer
    compute='_compute_timesheet_sheet_count' string='Timesheet Sheets Count'
  • timesheet_sheet_ids One2many → hr_timesheet.sheet
    comodel_name='hr_timesheet.sheet' inverse_name='employee_id' string='Timesheet Sheets'
Public methods (0)

No public methods.

New fields (19)
  • add_line_project_id Many2one → project.project
    comodel_name='project.project' domain="[('company_id', 'in', [company_id, False]), ('allow_timesheets', '=', True)]" help='If selected, the associated project is added to the timesheet sheet when clicked the button.' string='Select Project'
  • add_line_task_id Many2one → project.task
    comodel_name='project.task' domain="[('id', 'in', available_task_ids)]" help='If selected, the associated task is added to the timesheet sheet when clicked the button.' string='Select Task'
  • available_task_ids Many2many → project.task
    comodel_name='project.task' compute='_compute_available_task_ids' string='Available Tasks'
  • can_review Boolean
    compute='_compute_can_review' search='_search_can_review'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True string='Company'
  • complete_name Char
    compute='_compute_complete_name'
  • date_end Date
    default=<expr> index=True required=True string='Date To'
  • date_start Date
    default=<expr> index=True required=True string='Date From'
  • department_id Many2one → hr.department
    comodel_name='hr.department' default=<expr> string='Department'
  • employee_id Many2one → hr.employee
    comodel_name='hr.employee' default=<expr> required=True string='Employee'
  • line_ids One2many → hr_timesheet.sheet.line
    comodel_name='hr_timesheet.sheet.line' compute='_compute_line_ids' string='Timesheet Sheet Lines'
  • name Char
    compute='_compute_name'
  • new_line_ids One2many → hr_timesheet.sheet.new.analytic.line
    comodel_name='hr_timesheet.sheet.new.analytic.line' inverse_name='sheet_id' string='Temporary Timesheets'
  • review_policy Selection
    default=<expr> required=True selection=<expr>
  • reviewer_id Many2one → hr.employee
    comodel_name='hr.employee' string='Reviewer' tracking=True
  • state Selection
    default='new' index=True required=True string='Status' tracking=True args: [('new', 'New'), ('draft', 'Open'), ('confirm', 'Waiting Review'), ('done', 'Approved')]
  • timesheet_ids One2many → account.analytic.line
    comodel_name='account.analytic.line' inverse_name='sheet_id' string='Timesheets'
  • total_time Float
    compute='_compute_total_time' store=True
  • user_id Many2one → res.users
    comodel_name='res.users' related='employee_id.user_id' store=True string='User'
Public methods (16)
  • action_timesheet_confirm(self)
  • action_timesheet_done(self)
  • action_timesheet_draft(self)
  • action_timesheet_refuse(self)
  • add_line(self)
  • add_new_line(self, line)
  • button_add_line(self)
  • clean_timesheets(self, timesheets)
  • copy(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
  • delete_empty_lines(self, delete_empty_rows=False)
  • link_timesheets_to_sheet(self, timesheets)
  • onchange(self, values, field_name, field_onchange)
    Pass a flag for _compute_line_ids not to clean timesheet lines to be (kind of) idempotent during onchange
  • reset_add_line(self)
  • unlink(self)
  • write(self, vals)

New fields (3)
  • new_line_id Integer
    default=0
  • value_x Char
    string='Date Name'
  • value_y Char
    string='Project Name'
Public methods (1)
  • onchange_unit_amount(self)
    @api.onchange('unit_amount')
    This method is called when filling a cell of the matrix.

New fields (7)
  • company_id Many2one → res.company
    comodel_name='res.company' string='Company'
  • date Date
  • employee_id Many2one → hr.employee
    comodel_name='hr.employee' string='Employee'
  • project_id Many2one → project.project
    comodel_name='project.project' string='Project'
  • sheet_id Many2one → hr_timesheet.sheet
    comodel_name='hr_timesheet.sheet' ondelete='cascade'
  • task_id Many2one → project.task
    comodel_name='project.task' string='Task'
  • unit_amount Float
    default=0.0 string='Quantity'
Public methods (1)
  • get_unique_id(self)
    Hook for extensions

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • sheet_range Selection
    default='WEEKLY' help='The range of your Timesheet Sheet.' string='Timesheet Sheet Range' args: [('MONTHLY', 'Month'), ('WEEKLY', 'Week'), ('DAILY', 'Day')]
  • timesheet_sheet_review_policy Selection
    default='hr' help='How Timesheet Sheets review is performed.' selection=[('hr', 'By HR Officers'), ('hr_manager', 'By HR Managers'), ('timesheet_manager', 'By Timesheets Managers')]
  • timesheet_week_start Selection
    default='0' selection=_WEEKDAYS string='Week start day'
Public methods (0)

No public methods.

New fields (3)
  • sheet_range Selection
    help='The range of your Timesheet Sheet.' readonly=False related='company_id.sheet_range' string='Timesheet Sheet Range'
  • timesheet_sheet_review_policy Selection
    readonly=False related='company_id.timesheet_sheet_review_policy'
  • timesheet_week_start Selection
    help='Starting day for Timesheet Sheets.' readonly=False related='company_id.timesheet_week_start' string='Week Start Day'
Public methods (0)

No public methods.

New fields (1)
  • sheet_id Many2one → hr_timesheet.sheet
    comodel_name='hr_timesheet.sheet' readonly=True string='Sheet'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
59 days ago
Last activity
56 days ago
Repository
OCA/timesheet
Pull request
[19.0][MIG] hr_timesheet_sheet: Migration to 19.0 (#941)
Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
288 days ago
Last activity
92 days ago
Repository
OCA/timesheet
Pull request
[19.0][MIG] hr_timesheet_sheet: Migration to 19.0 (#841)