From 0e7751b9feb6f1109a336ba21654cbe0ce0a34d9 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 15 Jan 2013 16:38:16 +0530 Subject: [PATCH] added job_applicant, job_opening doctypes --- hr/doctype/job_applicant/__init__.py | 0 hr/doctype/job_applicant/job_applicant.py | 8 ++ hr/doctype/job_applicant/job_applicant.txt | 84 +++++++++++++++++++ hr/doctype/job_opening/__init__.py | 0 hr/doctype/job_opening/job_opening.py | 8 ++ hr/doctype/job_opening/job_opening.txt | 66 +++++++++++++++ .../support_ticket/get_support_mails.py | 2 + 7 files changed, 168 insertions(+) create mode 100644 hr/doctype/job_applicant/__init__.py create mode 100644 hr/doctype/job_applicant/job_applicant.py create mode 100644 hr/doctype/job_applicant/job_applicant.txt create mode 100644 hr/doctype/job_opening/__init__.py create mode 100644 hr/doctype/job_opening/job_opening.py create mode 100644 hr/doctype/job_opening/job_opening.txt diff --git a/hr/doctype/job_applicant/__init__.py b/hr/doctype/job_applicant/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/hr/doctype/job_applicant/job_applicant.py b/hr/doctype/job_applicant/job_applicant.py new file mode 100644 index 0000000000..928aa9ff9f --- /dev/null +++ b/hr/doctype/job_applicant/job_applicant.py @@ -0,0 +1,8 @@ +# For license information, please see license.txt + +from __future__ import unicode_literals +import webnotes + +class DocType: + def __init__(self, d, dl): + self.doc, self.doclist = d, dl \ No newline at end of file diff --git a/hr/doctype/job_applicant/job_applicant.txt b/hr/doctype/job_applicant/job_applicant.txt new file mode 100644 index 0000000000..3031211f3b --- /dev/null +++ b/hr/doctype/job_applicant/job_applicant.txt @@ -0,0 +1,84 @@ +[ + { + "owner": "Administrator", + "docstatus": 0, + "creation": "2013-01-15 16:32:13", + "modified_by": "Administrator", + "modified": "2013-01-15 16:32:13" + }, + { + "autoname": "field:applicant_name", + "description": "Applicant for a Job", + "doctype": "DocType", + "module": "HR", + "document_type": "Transaction", + "name": "__common__" + }, + { + "name": "__common__", + "parent": "Job Applicant", + "doctype": "DocField", + "parenttype": "DocType", + "permlevel": 0, + "parentfield": "fields" + }, + { + "parent": "Job Applicant", + "read": 1, + "cancel": 1, + "name": "__common__", + "create": 1, + "doctype": "DocPerm", + "write": 1, + "parenttype": "DocType", + "role": "HR User", + "report": 1, + "permlevel": 0, + "parentfield": "permissions" + }, + { + "name": "Job Applicant", + "doctype": "DocType" + }, + { + "doctype": "DocField", + "label": "Applicant Name", + "fieldname": "applicant_name", + "fieldtype": "Data", + "reqd": 1 + }, + { + "doctype": "DocField", + "label": "Status", + "fieldname": "status", + "fieldtype": "Select", + "options": "Open\nReject\nHold" + }, + { + "doctype": "DocField", + "width": "50%", + "fieldname": "column_break_3", + "fieldtype": "Column Break" + }, + { + "doctype": "DocField", + "label": "Job Opening", + "fieldname": "job_opening", + "fieldtype": "Link", + "options": "Job Opening" + }, + { + "doctype": "DocField", + "fieldname": "section_break_5", + "fieldtype": "Section Break" + }, + { + "doctype": "DocField", + "label": "Thread HTML", + "fieldname": "thread_html", + "fieldtype": "HTML" + }, + { + "doctype": "DocPerm" + } +] \ No newline at end of file diff --git a/hr/doctype/job_opening/__init__.py b/hr/doctype/job_opening/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/hr/doctype/job_opening/job_opening.py b/hr/doctype/job_opening/job_opening.py new file mode 100644 index 0000000000..928aa9ff9f --- /dev/null +++ b/hr/doctype/job_opening/job_opening.py @@ -0,0 +1,8 @@ +# For license information, please see license.txt + +from __future__ import unicode_literals +import webnotes + +class DocType: + def __init__(self, d, dl): + self.doc, self.doclist = d, dl \ No newline at end of file diff --git a/hr/doctype/job_opening/job_opening.txt b/hr/doctype/job_opening/job_opening.txt new file mode 100644 index 0000000000..bd994c6ad9 --- /dev/null +++ b/hr/doctype/job_opening/job_opening.txt @@ -0,0 +1,66 @@ +[ + { + "owner": "Administrator", + "docstatus": 0, + "creation": "2013-01-15 16:13:36", + "modified_by": "Administrator", + "modified": "2013-01-15 16:13:36" + }, + { + "description": "Description of a Job Opening", + "doctype": "DocType", + "module": "HR", + "document_type": "Transaction", + "name": "__common__" + }, + { + "name": "__common__", + "parent": "Job Opening", + "doctype": "DocField", + "parenttype": "DocType", + "permlevel": 0, + "parentfield": "fields" + }, + { + "parent": "Job Opening", + "read": 1, + "cancel": 1, + "name": "__common__", + "create": 1, + "doctype": "DocPerm", + "write": 1, + "parenttype": "DocType", + "role": "HR User", + "report": 1, + "permlevel": 0, + "parentfield": "permissions" + }, + { + "name": "Job Opening", + "doctype": "DocType" + }, + { + "doctype": "DocField", + "label": "Job Title", + "fieldname": "job_title", + "fieldtype": "Data", + "reqd": 1 + }, + { + "doctype": "DocField", + "label": "Status", + "fieldname": "status", + "fieldtype": "Select", + "options": "Open\nClosed" + }, + { + "description": "Job profile, qualifications required etc.", + "doctype": "DocField", + "label": "Description", + "fieldname": "description", + "fieldtype": "Text Editor" + }, + { + "doctype": "DocPerm" + } +] \ No newline at end of file diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py index e5e99f5942..c0b85e49b8 100644 --- a/support/doctype/support_ticket/get_support_mails.py +++ b/support/doctype/support_ticket/get_support_mails.py @@ -37,6 +37,8 @@ class SupportMailbox(POP3Mailbox): time_to_sec(timediff(now(), lastupdate)) < 1800") def process_message(self, mail): + if mail.from_email == self.email_settings.fields.get('support_email'): + return thread_id = mail.get_thread_id() ticket = None