diff --git a/addons/crm/test/process/lead2opportunity2win.yml b/addons/crm/test/process/lead2opportunity2win.yml index a9546750059..c1caf394c2e 100644 --- a/addons/crm/test/process/lead2opportunity2win.yml +++ b/addons/crm/test/process/lead2opportunity2win.yml @@ -107,7 +107,7 @@ lead = self.browse(cr, uid, ref('crm_case_electonicgoodsdealer0')) assert lead.stage_id.id == ref('crm.stage_lead8'), "Opportunity stage should be 'Lost'." assert lead.state == 'cancel', "Lost opportunity is not in 'cancel' state!" - assert lead.probability == 100.0, "Revenue probability should be 100.0!" + assert lead.probability == 0.0, "Revenue probability should be 0.0!" - I confirm review needs meeting. - diff --git a/addons/hr_recruitment/test/recruitment_process.yml b/addons/hr_recruitment/test/recruitment_process.yml index 56d1a0867a0..38b84fccab2 100644 --- a/addons/hr_recruitment/test/recruitment_process.yml +++ b/addons/hr_recruitment/test/recruitment_process.yml @@ -17,27 +17,34 @@ applicant = self.browse(cr, uid, applicant_ids[0], context=context) resume_ids = self.pool.get('ir.attachment').search(cr, uid, [('datas_fname','=','resume.doc'),('res_model','=',self._name),('res_id','=',applicant.id)]) assert applicant.name == "Application for the post of Jr.application Programmer.", "Applicant name does not match." + assert applicant.stage_id.id == ref('hr_recruitment.stage_job1'), "Stage should be 'Initial qualification' and is '%s'." % (applicant.stage_id.name) assert applicant.state == "draft", "Applicant state should be 'draft'." - assert len(resume_ids), "Resume does not attached." + assert len(resume_ids), "Resume is not attached." - - I refuse the applicant. + I refuse the applicant (hr_case_programmer) - !python {model: hr.applicant}: | - self.case_close(cr, uid, [ref("hr_case_programmer")]) + self.case_cancel(cr, uid, [ref("hr_case_programmer")]) - I check the details of the refused applicant. - - !python {model: crm.lead}: | - applicant_ids = self.search(cr, uid, [('email_from','=', 'Mr. Richard Anderson ')]) - applicant = self.browse(cr, uid, applicant_ids[0], context=context) + !python {model: hr.applicant}: | + applicant = self.browse(cr, uid, ref("hr_case_programmer"), context=context) assert applicant.stage_id.id == ref('hr_recruitment.stage_job6'), "Stage should be 'Refused' and is %s." % (applicant.stage_id.name) assert applicant.state == 'cancel', "Applicant is not in 'cancel' state." - - I reset and open the previously refused applicant. + I reset and re-open the previously refused applicant. - !python {model: hr.applicant}: | self.case_reset(cr, uid, [ref("hr_case_programmer")]) self.case_open(cr, uid, [ref("hr_case_programmer")]) +- + I check the details of the re-opened applicant. +- + !python {model: hr.applicant}: | + applicant = self.browse(cr, uid, ref("hr_case_programmer"), context=context) + assert applicant.stage_id.id == ref('hr_recruitment.stage_job2'), "Stage should be 'First interview' and is '%s'." % (applicant.stage_id.name) + assert applicant.state == "open", "Applicant state should be 'open'." - I assign the Job position to the applicant -