How to redirect to odoo applicant page (Recruitment module) based on the applicant id?
_onApplicantRedirect: function (event) {
var self = this;
event.preventDefault()
var applicant_id = parseInt($(event.currentTarget).data('applicant-id'));
return this._rpc({
model: 'hr.applicant',
method: 'view_hr_applicant',
args: [applicant_id],
}).then(function(action) {
return self.do_action(action);
});
python code
def view_hr_applicant(self):
self = self.with_context(skip_updation=True)
self_sudo = self
res['res_model'] = 'hr.applicant'
return res