mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix: amend cancelled job offer (#24589)
This commit is contained in:
@@ -16,7 +16,7 @@ class JobOffer(Document):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_vacancies()
|
self.validate_vacancies()
|
||||||
job_offer = frappe.db.exists("Job Offer",{"job_applicant": self.job_applicant})
|
job_offer = frappe.db.exists("Job Offer",{"job_applicant": self.job_applicant, "docstatus": ["!=", 2]})
|
||||||
if job_offer and job_offer != self.name:
|
if job_offer and job_offer != self.name:
|
||||||
frappe.throw(_("Job Offer: {0} is already for Job Applicant: {1}").format(frappe.bold(job_offer), frappe.bold(self.job_applicant)))
|
frappe.throw(_("Job Offer: {0} is already for Job Applicant: {1}").format(frappe.bold(job_offer), frappe.bold(self.job_applicant)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user