+
diff --git a/addons/hr_work_entry/models/hr_work_entry.py b/addons/hr_work_entry/models/hr_work_entry.py
index cf229a51680..403b2db4da5 100644
--- a/addons/hr_work_entry/models/hr_work_entry.py
+++ b/addons/hr_work_entry/models/hr_work_entry.py
@@ -5,7 +5,7 @@ from contextlib import contextmanager
from dateutil.relativedelta import relativedelta
from psycopg2 import OperationalError
-from odoo import api, fields, models
+from odoo import api, fields, models, _
class HrWorkEntry(models.Model):
@@ -61,7 +61,10 @@ class HrWorkEntry(models.Model):
@api.depends('work_entry_type_id', 'employee_id')
def _compute_name(self):
for work_entry in self:
- work_entry.name = "%s: %s" % (work_entry.work_entry_type_id.name, work_entry.employee_id.name)
+ if not work_entry.employee_id:
+ work_entry.name = _('Undefined')
+ else:
+ work_entry.name = "%s: %s" % (work_entry.work_entry_type_id.name or _('Undefined Type'), work_entry.employee_id.name)
@api.depends('state')
def _compute_conflict(self):
@@ -213,7 +216,7 @@ class HrWorkEntryType(models.Model):
_description = 'HR Work Entry Type'
name = fields.Char(required=True, translate=True)
- code = fields.Char(required=True)
+ code = fields.Char(required=True, help="Carefull, the Code is used in many references, changing it could lead to unwanted changes.")
color = fields.Integer(default=0)
sequence = fields.Integer(default=25)
active = fields.Boolean(
diff --git a/addons/hr_work_entry/views/hr_work_entry_views.xml b/addons/hr_work_entry/views/hr_work_entry_views.xml
index 2374815915c..ed5d14ad1a4 100644
--- a/addons/hr_work_entry/views/hr_work_entry_views.xml
+++ b/addons/hr_work_entry/views/hr_work_entry_views.xml
@@ -81,6 +81,7 @@
+
@@ -137,7 +138,6 @@
hr.work.entry.type
-
@@ -161,10 +161,13 @@
-
+
+
+
+
diff --git a/addons/hr_work_entry_contract/models/hr_work_entry.py b/addons/hr_work_entry_contract/models/hr_work_entry.py
index 1e6c70b50ba..ac5a63cde6c 100644
--- a/addons/hr_work_entry_contract/models/hr_work_entry.py
+++ b/addons/hr_work_entry_contract/models/hr_work_entry.py
@@ -152,4 +152,5 @@ class HrWorkEntryType(models.Model):
_inherit = 'hr.work.entry.type'
_description = 'HR Work Entry Type'
- is_leave = fields.Boolean(default=False, string="Time Off")
+ is_leave = fields.Boolean(
+ default=False, string="Time Off", help="Allow the work entry type to be linked with time off types.")
diff --git a/addons/hr_work_entry_contract/views/hr_work_entry_views.xml b/addons/hr_work_entry_contract/views/hr_work_entry_views.xml
index 1972add686e..84c29f8f188 100644
--- a/addons/hr_work_entry_contract/views/hr_work_entry_views.xml
+++ b/addons/hr_work_entry_contract/views/hr_work_entry_views.xml
@@ -31,11 +31,9 @@
hr.work.entry.type
-
-
-
-
-
+
+
+
diff --git a/addons/hr_work_entry_holidays/models/hr_work_entry.py b/addons/hr_work_entry_holidays/models/hr_work_entry.py
index 87add98f8ae..032ca1a187f 100644
--- a/addons/hr_work_entry_holidays/models/hr_work_entry.py
+++ b/addons/hr_work_entry_holidays/models/hr_work_entry.py
@@ -89,4 +89,6 @@ class HrWorkEntryType(models.Model):
_inherit = 'hr.work.entry.type'
_description = 'HR Work Entry Type'
- leave_type_ids = fields.One2many('hr.leave.type', 'work_entry_type_id', string='Time Off Type')
+ leave_type_ids = fields.One2many(
+ 'hr.leave.type', 'work_entry_type_id', string='Time Off Type',
+ help="Every new time off type in this list will be reported as select work entry in payslip.")