added job application

This commit is contained in:
Rushabh Mehta 2013-01-15 17:48:19 +05:30
parent b6f6d68de0
commit a9d4fb9a73
2 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,9 @@ class JobsMailbox(POP3Mailbox):
return name and name[0][0] or None return name and name[0][0] or None
def process_message(self, mail): def process_message(self, mail):
if mail.from_email == self.settings.email_id:
return
name = self.get_existing_application(mail.from_email) name = self.get_existing_application(mail.from_email)
if name: if name:
applicant = webnotes.model_wrapper("Job Applicant", name) applicant = webnotes.model_wrapper("Job Applicant", name)

View File

@ -13,4 +13,8 @@ class DocType(TransactionBase):
def on_communication_sent(self, comm): def on_communication_sent(self, comm):
webnotes.conn.set(self.doc, 'status', 'Replied') webnotes.conn.set(self.doc, 'status', 'Replied')
def on_trash(self):
webnotes.conn.sql("""delete from `tabCommunication`
where job_applicant=%s""", self.doc.name)