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
86 changes: 86 additions & 0 deletions project_timesheet_holidays_dynamic_description/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
==============================================
Project Timesheet Holidays Dynamic Description
==============================================

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

.. |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/17.0/project_timesheet_holidays_dynamic_description
:alt: OCA/timesheet
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/timesheet-17-0/timesheet-17-0-project_timesheet_holidays_dynamic_description
: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=17.0
:alt: Try me on Runboat

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

Use the time off description for the generated timesheet lines.

**Table of contents**

.. contents::
:local:

Usage
=====

Activate "Dynamic Descriptions" in the Leave Type settings. From that
point on, whenever a timesheet line is generated using that Leave Type,
the description set in the leave will be assigned to the Timesheet Line
.

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:%20project_timesheet_holidays_dynamic_description%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
-------

* Solvos Consultoría Informática

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

- `Solvos <https://www.solvos.es>`__:

- Carlos García <carlos.garcia@solvos.es>

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.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions project_timesheet_holidays_dynamic_description/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions project_timesheet_holidays_dynamic_description/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# © 2026 Solvos Consultoría Informática (<https://www.solvos.es>)
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Project Timesheet Holidays Dynamic Description",
"summary": """
Use the time off description for the generated timesheet lines.
""",
"category": "Human Resources",
"version": "17.0.1.0.0",
"depends": ["project_timesheet_holidays"],
"data": ["views/hr_holidays_views.xml"],
"author": "Solvos Consultoría Informática, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/timesheet",
"license": "AGPL-3",
"installable": True,
}
41 changes: 41 additions & 0 deletions project_timesheet_holidays_dynamic_description/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_timesheet_holidays_dynamic_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2026-04-16 17:45+0000\n"
"Last-Translator: \"David Alonso (Solvos)\" <david.alonso@solvos.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.15.2\n"

#. module: project_timesheet_holidays_dynamic_description
#: model:ir.model.fields,field_description:project_timesheet_holidays_dynamic_description.field_hr_leave_type__dynamic_timesheet_description
msgid "Dynamic Description"
msgstr "Descripción dinámica"

#. module: project_timesheet_holidays_dynamic_description
#: model:ir.model.fields,help:project_timesheet_holidays_dynamic_description.field_hr_leave_type__dynamic_timesheet_description
msgid ""
"If enabled, timesheets generated from time off will contains the leave "
"description."
msgstr ""
"Si está habilitado, los partes de horas generados desde la ausencia "
"contendrán la descripción de la ausencia."

#. module: project_timesheet_holidays_dynamic_description
#: model:ir.model,name:project_timesheet_holidays_dynamic_description.model_hr_leave
msgid "Time Off"
msgstr "Ausencia"

#. module: project_timesheet_holidays_dynamic_description
#: model:ir.model,name:project_timesheet_holidays_dynamic_description.model_hr_leave_type
msgid "Time Off Type"
msgstr "Tipo de ausencia"
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_timesheet_holidays_dynamic_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: project_timesheet_holidays_dynamic_description
#: model:ir.model.fields,field_description:project_timesheet_holidays_dynamic_description.field_hr_leave_type__dynamic_timesheet_description
msgid "Dynamic Description"
msgstr ""

#. module: project_timesheet_holidays_dynamic_description
#: model:ir.model.fields,help:project_timesheet_holidays_dynamic_description.field_hr_leave_type__dynamic_timesheet_description
msgid ""
"If enabled, timesheets generated from time off will contains the leave "
"description."
msgstr ""

#. module: project_timesheet_holidays_dynamic_description
#: model:ir.model,name:project_timesheet_holidays_dynamic_description.model_hr_leave
msgid "Time Off"
msgstr ""

#. module: project_timesheet_holidays_dynamic_description
#: model:ir.model,name:project_timesheet_holidays_dynamic_description.model_hr_leave_type
msgid "Time Off Type"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import hr_leave
from . import hr_leave_type
21 changes: 21 additions & 0 deletions project_timesheet_holidays_dynamic_description/models/hr_leave.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# © 2026 Solvos Consultoría Informática (<https://www.solvos.es>)
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html

from odoo import models


class HrLeave(models.Model):
_inherit = "hr.leave"

def _timesheet_prepare_line_values(
self, index, work_hours_data, day_date, work_hours_count, project, task
):
timesheet_line = super()._timesheet_prepare_line_values(
index, work_hours_data, day_date, work_hours_count, project, task
)

if self.holiday_status_id.dynamic_timesheet_description and self.name:
old_ts_line = timesheet_line.get("name", "")
timesheet_line["name"] = self.name + " - " + old_ts_line

return timesheet_line
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# © 2026 Solvos Consultoría Informática (<https://www.solvos.es>)
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html

from odoo import fields, models


class HolidaysType(models.Model):
_inherit = "hr.leave.type"

dynamic_timesheet_description = fields.Boolean(
string="Dynamic Description",
default=True,
help="If enabled, timesheets generated from time off "
"will contains the leave description.",
)
3 changes: 3 additions & 0 deletions project_timesheet_holidays_dynamic_description/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 @@
- [Solvos](https://www.solvos.es):
- Carlos García \<carlos.garcia@solvos.es\>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use the time off description for the generated timesheet lines.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Activate "Dynamic Descriptions" in the Leave Type settings. From that point on, whenever a timesheet line is generated using that Leave Type, the description set in the leave will be assigned to the Timesheet Line .
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading