Fix bug
This commit is contained in:
parent
5358a8bc53
commit
79a94f8bd7
|
|
@ -212,6 +212,6 @@ class AuthenticationController(http.Controller):
|
|||
employee.sudo().write({'fcm_token':kw.get('fcm_token')})
|
||||
|
||||
dic['token'] = token
|
||||
dic['is_approve'] = 'group_division_manager' in dic.get('groups',[])
|
||||
http_helper.cleanup();
|
||||
dic['is_approve'] = 'group_division_manager' in dic.get('groups',[]) or 'group_hr_user' in dic.get('groups', [])
|
||||
http_helper.cleanup()
|
||||
return http_helper.response(data=dic, message=_("User log in successfully"))
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ class AuthenticationController(http.Controller):
|
|||
employee.sudo().write({'fcm_token':kw.get('fcm_token')})
|
||||
|
||||
dic['token'] = token
|
||||
dic['is_approve'] = 'group_division_manager' in dic.get('groups',[])
|
||||
dic['is_approve'] = 'group_division_manager' in dic.get('groups',[]) or 'group_hr_user' in dic.get('groups', [])
|
||||
dic['has_two_periods'] = not employee.resource_calendar_id.is_full_day if employee.resource_calendar_id else False
|
||||
http_helper.cleanup()
|
||||
end_time_pc = time.perf_counter()
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class Users(models.Model):
|
|||
d["job"] = employee.job_id.name if employee and employee.job_id else None
|
||||
d["employe_id"] = employee.id if employee and employee.id else None
|
||||
d["attendance_status"] = attendance_status if attendance_status else None
|
||||
d['is_approve'] = 'group_division_manager' in d.get('groups',[])
|
||||
d['is_approve'] = 'group_division_manager' in d.get('groups',[]) or 'group_hr_user' in d.get('groups', [])
|
||||
d['has_two_periods'] = not employee.resource_calendar_id.is_full_day if employee.resource_calendar_id else False
|
||||
res.append(d)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue