This commit is contained in:
Elyageen 2024-07-20 20:02:51 +03:00
parent be3665142a
commit b86e1df134
1 changed files with 7 additions and 0 deletions

View File

@ -22,7 +22,14 @@ class OverTimeController(http.Controller):
def get_overtime_datas(self,transfer_type=None, **kw):
try:
http_method, body, headers, token = http_helper.parse_request()
result = validator.verify_token(token)
if not result['status']:
return http_helper.errcode(code=result['code'], message=result['message'])
user = validator.verify(token)
if not user:
return http_helper.response(code=400,
message=_("You are not allowed to perform this operation. please check with one of your team admins"),
success=False)
data = {}
if transfer_type == 'accounting':
account = request.env['account.account'].sudo().search([])