[FIX] hr: fix the on/off boarding warning in employee
Steps to reproduce: - Install Employees App Configuration - Got to the Employees > Configuration > Activity Planning > Set the On/Offboarding Plans - Create Test Employee With No Catch - Click on Launch Plan action - Check the Warning in Launch Plan Wizard When employee's coach or manager empty then warning is appeared coach's/manager's user is not set.In this commit we have shown in the warning that the coach/manager is not set. task-3193218 closes odoo/odoo#115889 X-original-commit: 421c238129676a83df63f00abadd539e82ced2eb Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
committed by
Prakash Prajapati
parent
2707556f5e
commit
869c7316cd
@@ -2546,7 +2546,7 @@ msgstr ""
|
||||
#. odoo-python
|
||||
#: code:addons/hr/models/hr_plan_activity_type.py:0
|
||||
#, python-format
|
||||
msgid "User of coach of employee %s is not set."
|
||||
msgid "The user of %s's coach is not set."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr
|
||||
|
||||
@@ -44,13 +44,13 @@ class HrPlanActivityType(models.Model):
|
||||
if not employee.coach_id:
|
||||
warning = _('Coach of employee %s is not set.', employee.name)
|
||||
responsible = employee.coach_id.user_id
|
||||
if not responsible:
|
||||
warning = _('User of coach of employee %s is not set.', employee.name)
|
||||
if employee.coach_id and not responsible:
|
||||
warning = _("The user of %s's coach is not set.", employee.name)
|
||||
elif self.responsible == 'manager':
|
||||
if not employee.parent_id:
|
||||
warning = _('Manager of employee %s is not set.', employee.name)
|
||||
responsible = employee.parent_id.user_id
|
||||
if not responsible:
|
||||
if employee.parent_id and not responsible:
|
||||
warning = _("The manager of %s should be linked to a user.", employee.name)
|
||||
elif self.responsible == 'employee':
|
||||
responsible = employee.user_id
|
||||
|
||||
Reference in New Issue
Block a user