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
98 changes: 98 additions & 0 deletions helpdesk_timesheet_time_type_non_billable/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
=========================================
Helpdesk Timesheet Time Type Non Billable
=========================================

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

.. |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%2Fhelpdesk-lightgray.png?logo=github
:target: https://github.com/OCA/helpdesk/tree/17.0/helpdesk_timesheet_time_type_non_billable
:alt: OCA/helpdesk
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/helpdesk-17-0/helpdesk-17-0-helpdesk_timesheet_time_type_non_billable
: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/helpdesk&target_branch=17.0
:alt: Try me on Runboat

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

This module extends the functionality of hr_timesheet_type_non_billable
so that non-billable hours from helpdesk tickets are also excluded.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Go to Project > Configuration > Time Type
2. Create or edit a Time Type and mark it as Non Billable
3. Go to Helpdesk -> Select one ticket
4. Select a project on the ticket
5. Create a new timesheet with the Time Type you just created
6. You will see that the time you entered on the timesheet is not
discounted on the remaining hours or added in total hours

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/helpdesk/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/helpdesk/issues/new?body=module:%20helpdesk_timesheet_time_type_non_billable%0Aversion:%2017.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
-------

* APSL-Nagarro

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

[APSL-Nagarro](https://apsl.tech):

- Miquel Pascual López <mpascual@apsl.net>

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-mpascuall| image:: https://github.com/mpascuall.png?size=40px
:target: https://github.com/mpascuall
:alt: mpascuall

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

|maintainer-mpascuall|

This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/17.0/helpdesk_timesheet_time_type_non_billable>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions helpdesk_timesheet_time_type_non_billable/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2025 Miquel Pascual López(APSL-Nagarro)<mpascual@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
18 changes: 18 additions & 0 deletions helpdesk_timesheet_time_type_non_billable/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2025 Miquel Pascual López(APSL-Nagarro)<mpascual@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Helpdesk Timesheet Time Type Non Billable",
"version": "17.0.1.0.0",
"category": "Helpdesk",
"website": "https://github.com/OCA/helpdesk",
"author": "APSL-Nagarro, Odoo Community Association (OCA)",
"maintainers": ["mpascuall"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"helpdesk_mgmt_timesheet",
"helpdesk_timesheet_time_type",
"hr_timesheet_type_non_billable",
],
}
4 changes: 4 additions & 0 deletions helpdesk_timesheet_time_type_non_billable/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2025 Miquel Pascual López(APSL-Nagarro)<mpascual@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import helpdesk_ticket
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2025 Miquel Pascual López(APSL-Nagarro)<mpascual@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, models


class HelpdeskTicket(models.Model):
_inherit = "helpdesk.ticket"

@api.depends("timesheet_ids.unit_amount", "timesheet_ids.time_type_id.non_billable")
def _compute_total_hours(self):
for record in self:
record.total_hours = sum(
line.unit_amount
for line in record.timesheet_ids
if not line.time_type_id.non_billable
)
3 changes: 3 additions & 0 deletions helpdesk_timesheet_time_type_non_billable/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\[APSL-Nagarro\](<https://apsl.tech>):
- Miquel Pascual López \<<mpascual@apsl.net>\>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module extends the functionality of hr_timesheet_type_non_billable so that non-billable hours from helpdesk tickets are also excluded.
6 changes: 6 additions & 0 deletions helpdesk_timesheet_time_type_non_billable/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1. Go to Project > Configuration > Time Type
2. Create or edit a Time Type and mark it as Non Billable
3. Go to Helpdesk -> Select one ticket
4. Select a project on the ticket
5. Create a new timesheet with the Time Type you just created
5. You will see that the time you entered on the timesheet is not discounted on the remaining hours or added in total hours
Loading