diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py index 4f8af0675..17f4c2c10 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py @@ -380,8 +380,7 @@ class PermissionController(http.Controller): success=False) try: permission_type_id = http.request.env['hr.personal.permission.type'].browse(int(body.get('permission_type_id'))) - permission_hours = self.permission_number_decrement(employee, body['date_from'], body['date_to'], - permission_type_id) + permission_hours = self.permission_number_decrement(employee, body['date_from'], body['date_to'],permission_type_id) return http_helper.response(message="Data Found", data={'balance': permission_hours, 'permission_limit': permission_type_id.daily_hours}) @@ -398,8 +397,7 @@ class PermissionController(http.Controller): def permission_number_decrement(self, employee_id, permission_date_from, permission_date_to, permission_type_id): if employee_id: if not employee_id.first_hiring_date: - raise Warning( - _('You can not Request Permission The Employee have Not First Hiring Date')) + raise Warning(_('You can not Request Permission The Employee have Not First Hiring Date')) if permission_date_to: current_date = datetime.strptime(permission_date_to, DEFAULT_SERVER_DATETIME_FORMAT) current_month = current_date.month @@ -427,8 +425,7 @@ class PermissionController(http.Controller): permission_date_to, DEFAULT_SERVER_DATETIME_FORMAT).date() if permission_date1 == date_to_value1: - raise Warning( - _('Sorry You Have Used All Your Permission In This Day you have one permission per a Day')) + raise Warning(_('Sorry You Have Used All Your Permission In This Day you have one permission per a Day')) if number_of_per > all_perission: return round(number_of_per - all_perission, 2)