Merge pull request #840 from expsa/fixbug

Update hr_personal_permission.py
This commit is contained in:
zainab2097 2024-08-20 18:56:53 +03:00 committed by GitHub
commit 2fcd0503be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ class HrPersonalPermission(models.Model):
hr_manager = rec.sudo().employee_id.user_id.company_id.hr_manager_id
if manager:
if (manager.user_id.id == rec.env.uid or hr_manager.user_id.id == rec.env.uid):
if approve_by!='direct_manager'
if approve_by!='direct_manager':
rec.write({'state': 'direct_manager'})
else:
rec.approve()