Merge pull request #330 from expsa/fix_api_web

fix
This commit is contained in:
AbuzarExp 2024-07-21 11:53:00 +03:00 committed by GitHub
commit eb0ac3bdb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 5 deletions

View File

@ -106,10 +106,7 @@ class PermissionController(http.Controller):
permission = None
try:
permission_number = self.permission_number_decrement(employee, body['date_from'], body['date_to'])
permission = (
http.request.env["hr.personal.permission"]
.sudo()
.create(
permission = http.request.env["hr.personal.permission"].sudo().create(
{
"employee_id": employee.id,
"date_from": body["date_from"],
@ -120,7 +117,7 @@ class PermissionController(http.Controller):
"date": body["date"],
}
)
)
# permission.permission_number_decrement()
if 'attachment' in body and body['attachment']:
attach = http.request.env['ir.attachment'].sudo().create({