Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions hr_timesheet_manager_approver/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
==========================
Timesheet Manager Approver
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a835f0b5c73ced76ef46f252021aa25d284d12f1de59606a45930c03c15f95d3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github
:target: https://github.com/OCA/timesheet/tree/18.0/hr_timesheet_manager_approver
:alt: OCA/timesheet
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/timesheet-18-0/timesheet-18-0-hr_timesheet_manager_approver
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the standard timesheet approver rules so that a user
with the group *User: all timesheets* can also manage the timesheets of
their subordinate employees (i.e. employees whose *Manager* field points
to the approver).

It updates the ``timesheet_line_rule_approver`` record rule to include
the clause
``('employee_id.parent_id.user_id', 'in', (False, user.id))``.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module:

1. Go to **Employees** and open the employee you want to set as a
manager.
2. In the *Work Information* tab, under *Employee*, set the **Timesheet
Responsible** or ensure the **Manager** field points to the approver
user.
3. Assign the *Timesheets / User: all timesheets* group to the manager
user (*Settings → Users & Companies → Users* → *Timesheets* section).
4. Log in as the manager user.
5. Go to **Timesheets**.
6. You will now see, edit and delete timesheets for employees who report
to you, even on projects with *Invited employees* privacy. Also you
can create but only in the projects where the user has access.

**Important:** Without this module, a timesheet approver can only manage
timesheets on projects where they are a follower. With this module, the
approver also gains access to their subordinates' timesheets regardless
of project visibility.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_manager_approver%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Moduon

Contributors
------------

- Emilio Pascual (`Moduon <https://www.moduon.team/>`__)

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-EmilioPascual| image:: https://github.com/EmilioPascual.png?size=40px
:target: https://github.com/EmilioPascual
:alt: EmilioPascual
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
:target: https://github.com/rafaelbn
:alt: rafaelbn

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-EmilioPascual| |maintainer-rafaelbn|

This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/18.0/hr_timesheet_manager_approver>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions hr_timesheet_manager_approver/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2025 Moduon Team SL
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
19 changes: 19 additions & 0 deletions hr_timesheet_manager_approver/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 Moduon Team SL
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Timesheet Manager Approver",
"version": "18.0.1.0.0",
"category": "Human Resources",
"summary": "Allow timesheet approvers to manage subordinate timesheets",
"license": "AGPL-3",
"author": "Moduon, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/timesheet",
"depends": ["hr_timesheet"],
"maintainers": ["EmilioPascual", "rafaelbn"],
"data": [
"security/hr_timesheet_manager_approver_security.xml",
],
"installable": True,
"auto_install": False,
}
3 changes: 3 additions & 0 deletions hr_timesheet_manager_approver/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions hr_timesheet_manager_approver/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Emilio Pascual ([Moduon](https://www.moduon.team/))
6 changes: 6 additions & 0 deletions hr_timesheet_manager_approver/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module extends the standard timesheet approver rules so that a user with the
group *User: all timesheets* can also manage the timesheets of their subordinate
employees (i.e. employees whose *Manager* field points to the approver).

It updates the ``timesheet_line_rule_approver`` record rule to include the clause
``('employee_id.parent_id.user_id', 'in', (False, user.id))``.
10 changes: 10 additions & 0 deletions hr_timesheet_manager_approver/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To use this module:

1. Go to **Employees** and open the employee you want to set as a manager.
2. In the *Work Information* tab, under *Employee*, set the **Timesheet Responsible** or ensure the **Manager** field points to the approver user.
3. Assign the *Timesheets / User: all timesheets* group to the manager user (*Settings → Users & Companies → Users* → *Timesheets* section).
4. Log in as the manager user.
5. Go to **Timesheets**.
6. You will now see, edit and delete timesheets for employees who report to you, even on projects with *Invited employees* privacy. Also you can create but only in the projects where the user has access.

**Important:** Without this module, a timesheet approver can only manage timesheets on projects where they are a follower. With this module, the approver also gains access to their subordinates' timesheets regardless of project visibility.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2025 Moduon Team SL
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="hr_timesheet.timesheet_line_rule_approver" model="ir.rule">
<field name="domain_force">[
('project_id', '!=', False),
'|', '|', '|',
('project_id.privacy_visibility', '!=', 'followers'),
('project_id.message_partner_ids', 'in', [user.partner_id.id]),
('task_id.message_partner_ids', 'in', [user.partner_id.id]),
('employee_id.parent_id.user_id', '=', user.id)
]</field>
</record>
</odoo>
Loading
Loading