mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-25 18:52:08 +02:00
19.0 vanilla
This commit is contained in:
parent
a1137a1456
commit
e1d89e11e3
2789 changed files with 1093187 additions and 605897 deletions
|
|
@ -7,6 +7,16 @@ from odoo import http
|
|||
|
||||
class HrHolidaysController(http.Controller):
|
||||
|
||||
@http.route('/leave/approve', type='http', auth='user', methods=['GET'])
|
||||
def hr_holidays_request_approve(self, res_id, token):
|
||||
comparison, record, redirect = MailController._check_token_and_record_or_redirect('hr.leave', int(res_id), token)
|
||||
if comparison and record:
|
||||
try:
|
||||
record.action_approve()
|
||||
except Exception:
|
||||
return MailController._redirect_to_generic_fallback('hr.leave', res_id)
|
||||
return redirect
|
||||
|
||||
@http.route('/leave/validate', type='http', auth='user', methods=['GET'])
|
||||
def hr_holidays_request_validate(self, res_id, token):
|
||||
comparison, record, redirect = MailController._check_token_and_record_or_redirect('hr.leave', int(res_id), token)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue