enhancements of resume parsing
This commit is contained in:
parent
f698203a7f
commit
957e832abd
|
|
@ -2163,7 +2163,21 @@ class HrRecruitmentAutoDocWizardLine(models.TransientModel):
|
|||
self.ensure_one()
|
||||
parsed_data = self._get_edited_parsed_data()
|
||||
self.extracted_payload = json.dumps(parsed_data, indent=2, ensure_ascii=False)
|
||||
return {"type": "ir.actions.act_window_close"}
|
||||
return self._action_open_parent_wizard()
|
||||
|
||||
def action_close_line(self):
|
||||
self.ensure_one()
|
||||
return self._action_open_parent_wizard()
|
||||
|
||||
def _action_open_parent_wizard(self):
|
||||
self.ensure_one()
|
||||
return {
|
||||
"type": "ir.actions.act_window",
|
||||
"res_model": self.wizard_id._name,
|
||||
"res_id": self.wizard_id.id,
|
||||
"view_mode": "form",
|
||||
"target": "new",
|
||||
}
|
||||
|
||||
def _prepare_editable_vals(self, parsed_data):
|
||||
parsed_data = parsed_data or {}
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button name="action_save_line_changes" string="Save & Close" type="object" class="btn-primary"/>
|
||||
<button string="Close" special="cancel" class="btn-secondary"/>
|
||||
<button name="action_save_line_changes" string="Save" type="object" class="btn-primary"/>
|
||||
<button name="action_close_line" string="Close" type="object" class="btn-secondary"/>
|
||||
</footer>
|
||||
</form>
|
||||
<kanban class="o_kanban_small_column">
|
||||
|
|
|
|||
|
|
@ -284,8 +284,12 @@ class HRApplicant(models.Model):
|
|||
'applicant_id',
|
||||
string='Request Forms'
|
||||
)
|
||||
post_onboarding_form_status = fields.Selection([('draft','Draft'),('email_sent_to_candidate','Email Sent to Candidate'),('done','Done')], default='draft')
|
||||
legend_blocked = fields.Char(related='recruitment_stage_id.legend_blocked', string='Kanban Blocked')
|
||||
post_onboarding_form_status = fields.Selection([('draft','Draft'),('email_sent_to_candidate','Email Sent to Candidate'),('done','Done')], default='draft')
|
||||
doc_requests_form_status = fields.Selection(
|
||||
[('draft', 'Draft'), ('email_sent_to_candidate', 'Email Sent to Candidate'), ('done', 'Done')],
|
||||
default='draft',
|
||||
)
|
||||
legend_blocked = fields.Char(related='recruitment_stage_id.legend_blocked', string='Kanban Blocked')
|
||||
legend_done = fields.Char(related='recruitment_stage_id.legend_done', string='Kanban Valid')
|
||||
legend_normal = fields.Char(related='recruitment_stage_id.legend_normal', string='Kanban Ongoing')
|
||||
employee_code = fields.Char(related="employee_id.employee_id")
|
||||
|
|
@ -300,8 +304,14 @@ class HRApplicant(models.Model):
|
|||
('validated', 'Validated')], default='pending')
|
||||
|
||||
approval_required = fields.Boolean(related='recruitment_stage_id.require_approval')
|
||||
application_submitted = fields.Boolean(string="Application Submitted")
|
||||
resume = fields.Binary(related='candidate_id.resume', readonly=False, compute_sudo=True)
|
||||
application_submitted = fields.Boolean(string="Application Submitted")
|
||||
send_second_application_form = fields.Boolean(string="Send Second Application Form")
|
||||
send_post_onboarding_form = fields.Boolean(string="Send Post Onboarding Form")
|
||||
second_application_form_status = fields.Selection(
|
||||
[('draft', 'Draft'), ('email_sent_to_candidate', 'Email Sent to Candidate'), ('done', 'Done')],
|
||||
default='draft',
|
||||
)
|
||||
resume = fields.Binary(related='candidate_id.resume', readonly=False, compute_sudo=True)
|
||||
resume_type = fields.Char(related='candidate_id.resume_type', readonly=False, compute_sudo=True)
|
||||
resume_name = fields.Char(related='candidate_id.resume_name', readonly=False, compute_sudo=True)
|
||||
|
||||
|
|
@ -350,11 +360,11 @@ class HRApplicant(models.Model):
|
|||
'joining_attachment_ids': [(0, 0, values) for values in latest_attachments.values()]
|
||||
})
|
||||
|
||||
def action_share_applicant(self):
|
||||
self.ensure_one()
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': _('Share Applicant'),
|
||||
def action_share_applicant(self):
|
||||
self.ensure_one()
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': _('Share Applicant'),
|
||||
'res_model': 'client.submission.mails.template.wizard',
|
||||
'view_mode': 'form',
|
||||
'view_id': self.env.ref('hr_recruitment_extended.view_client_submission_mails_template_wizard_form').id,
|
||||
|
|
@ -362,12 +372,15 @@ class HRApplicant(models.Model):
|
|||
'context': {
|
||||
'default_template_id': self.env.ref(
|
||||
'hr_recruitment_extended.application_client_submission_email_template'
|
||||
).id,
|
||||
},
|
||||
}
|
||||
|
||||
def submit_for_approval(self):
|
||||
for rec in self:
|
||||
).id,
|
||||
},
|
||||
}
|
||||
|
||||
def submit_to_client(self):
|
||||
return self.action_share_applicant()
|
||||
|
||||
def submit_for_approval(self):
|
||||
for rec in self:
|
||||
manager_id = self.env['ir.config_parameter'].sudo().get_param('requisitions.requisition_manager')
|
||||
if not manager_id:
|
||||
raise ValidationError(_("Recruitment Manager is not selected please go into the Configuration->Settings and add the Manager"))
|
||||
|
|
@ -419,11 +432,11 @@ class HRApplicant(models.Model):
|
|||
template.send_mail(applicant.id, force_send=True)
|
||||
applicant.second_application_form_status = 'email_sent_to_candidate'
|
||||
|
||||
def send_jod_form_to_employee(self):
|
||||
for rec in self:
|
||||
if not rec.employee_id:
|
||||
raise ValidationError(_('You must first create the employee before before Sending the Post Onboarding Form'))
|
||||
|
||||
def send_jod_form_to_employee(self):
|
||||
for rec in self:
|
||||
if not rec.employee_id:
|
||||
raise ValidationError(_('You must first create the employee before before Sending the Post Onboarding Form'))
|
||||
|
||||
elif not rec.employee_id.employee_id:
|
||||
raise ValidationError(_('Employee Code for the Employee (%s) is missing')%(rec.employee_id.name))
|
||||
return {
|
||||
|
|
@ -432,14 +445,17 @@ class HRApplicant(models.Model):
|
|||
'res_model': 'post.onboarding.attachment.wizard',
|
||||
'view_mode': 'form',
|
||||
'view_type': 'form',
|
||||
'target': 'new',
|
||||
'context': {'default_req_attachment_ids': []}
|
||||
}
|
||||
|
||||
|
||||
def send_pre_onboarding_doc_request_form_to_candidate(self):
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'context': {'default_req_attachment_ids': []}
|
||||
}
|
||||
|
||||
def send_post_onboarding_form_to_candidate(self):
|
||||
return self.send_jod_form_to_employee()
|
||||
|
||||
|
||||
def send_pre_onboarding_doc_request_form_to_candidate(self):
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': 'Select Attachments',
|
||||
'res_model': 'post.onboarding.attachment.wizard',
|
||||
'view_mode': 'form',
|
||||
|
|
|
|||
Loading…
Reference in New Issue