[ADD]project_timesheet_holidays_type #3
1
project_timesheet_holidays_type/__init__.py
Normal file
1
project_timesheet_holidays_type/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
21
project_timesheet_holidays_type/__manifest__.py
Normal file
21
project_timesheet_holidays_type/__manifest__.py
Normal 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',
|
||||||
|
}
|
1
project_timesheet_holidays_type/models/__init__.py
Normal file
1
project_timesheet_holidays_type/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import hr_holidays
|
12
project_timesheet_holidays_type/models/hr_holidays.py
Normal file
12
project_timesheet_holidays_type/models/hr_holidays.py
Normal 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 (%s/%s)",self.holiday_status_id.name, index + 1, len(work_hours_data))
|
||||||
|
return res
|
Reference in New Issue
Block a user