appraisal by manager
This commit is contained in:
parent
5c2461755a
commit
507c2f756d
|
|
@ -1332,15 +1332,15 @@ msgstr "إعدادات التقييم"
|
|||
msgid "Appraisal ;Automatic Employee Appraisal"
|
||||
msgstr "التقييم : إنشاء تقييم الموظفين تلقائيا"
|
||||
|
||||
#. module: exp_hr_appraisal
|
||||
#: code:addons/exp_hr_appraisal/models/appraisal.py:0
|
||||
#, python-format
|
||||
msgid "Only Manager of Employee \"%s\" should approve the Appraisal"
|
||||
msgstr "فقط مدير الموظف\"%s\" يستطيع إعتماد التقييم"
|
||||
|
||||
|
||||
|
||||
#. module: exp_hr_appraisal
|
||||
#: model_terms:ir.ui.view,arch_db:exp_hr_appraisal.hr_appraisal_tree_view
|
||||
msgid "Level achieved"
|
||||
msgstr "الدرجة المحققة"
|
||||
|
||||
#. module: exp_hr_appraisal
|
||||
#: code:addons/exp_hr_appraisal/models/appraisal.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The evaluation is approved by the direct manager \"%s\" If you have any "
|
||||
"problems, contact your manager."
|
||||
msgstr "اعتماد التقييم من صلاحية المدير المباشر \"%s\". اذا لديك اي مشكلة تواصل مع مديرك"
|
||||
|
|
@ -224,6 +224,10 @@ class Appraisal(models.Model):
|
|||
|
||||
def set_state_done(self):
|
||||
for item in self:
|
||||
if item.appraisal_type != 'training' and item.employee_id.parent_id.user_id != self.env.user:
|
||||
raise exceptions.Warning(
|
||||
_('The evaluation is approved by the direct manager "%s" If you have any problems, contact your manager.') % item.employee_id.parent_id.user_id.name)
|
||||
|
||||
if item.employee_protest and item.state == 'draft':
|
||||
item.state = 'employee_confirmation'
|
||||
else:
|
||||
|
|
@ -234,11 +238,7 @@ class Appraisal(models.Model):
|
|||
else:
|
||||
raise exceptions.Warning(
|
||||
_('There is no contract for employee "%s" to update appraisal result ') % item.employee_id.name)
|
||||
if item.appraisal_type != 'training' and item.employee_id.parent_id.user_id != self.env.user:
|
||||
raise exceptions.Warning(
|
||||
_('Only Manager of Employee "%s" should approve the Appraisal') % item.employee_id.parent_id.user_id.name)
|
||||
else:
|
||||
item.state = 'state_done'
|
||||
item.state = 'state_done'
|
||||
|
||||
def closed(self):
|
||||
self.state = 'closed'
|
||||
|
|
|
|||
Loading…
Reference in New Issue