2 Commits

Author SHA1 Message Date
f5377a3af3 [ADD]project_timesheet_holidays_type 2024-06-03 18:48:29 +02:00
b406aeb2f1 [ADD]project_timesheet_holidays_type 2024-06-03 15:11:50 +02:00
4 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1 @@
from . import models

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "project timesheet holidays type",
'version': '16.0.1.0.0',
'depends': ['project_timesheet_holidays'],
'author': "Élabore",
'category': 'Human Resources/Employees',
'summary' : "add holidays type in project timesheet holidays type description",
'description': """
In project timesheet holidays, all holidays types are name 'Times off (d/d)' in description.
This module changes 'Times off' by the holiday type for better description.
""",
'data': [
],
'demo': [
],
'application': False,
'license': 'LGPL-3',
}

View File

@@ -0,0 +1 @@
from . import hr_holidays

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, _
class Holidays(models.Model):
_inherit = "hr.leave"
def _timesheet_prepare_line_values(self, index, work_hours_data, day_date, work_hours_count):
res = super()._timesheet_prepare_line_values(index, work_hours_data, day_date, work_hours_count)
res['name'] = _("%s",self.holiday_status_id.name)
return res