mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
added job application
This commit is contained in:
@@ -37,11 +37,15 @@ class JobsMailbox(POP3Mailbox):
|
|||||||
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)
|
||||||
|
if applicant.doc.status!="Rejected":
|
||||||
|
applicant.doc.status = "Open"
|
||||||
|
applicant.doc.save()
|
||||||
else:
|
else:
|
||||||
applicant = webnotes.model_wrapper({
|
applicant = webnotes.model_wrapper({
|
||||||
"doctype":"Job Applicant",
|
"doctype":"Job Applicant",
|
||||||
"applicant_name": mail.from_real_name or mail.from_email,
|
"applicant_name": mail.from_real_name or mail.from_email,
|
||||||
"email_id": mail.from_email
|
"email_id": mail.from_email,
|
||||||
|
"status": "Open"
|
||||||
})
|
})
|
||||||
applicant.insert()
|
applicant.insert()
|
||||||
|
|
||||||
|
|||||||
@@ -10,3 +10,7 @@ class DocType(TransactionBase):
|
|||||||
|
|
||||||
def onload(self):
|
def onload(self):
|
||||||
self.add_communication_list()
|
self.add_communication_list()
|
||||||
|
|
||||||
|
def on_communication_sent(self, comm):
|
||||||
|
webnotes.conn.set(self.doc, 'status', 'Replied')
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"creation": "2013-01-15 16:32:13",
|
"creation": "2013-01-15 16:32:13",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"modified": "2013-01-15 17:30:46"
|
"modified": "2013-01-15 17:40:29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"autoname": "field:applicant_name",
|
"autoname": "field:applicant_name",
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"label": "Status",
|
"label": "Status",
|
||||||
"fieldname": "status",
|
"fieldname": "status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"options": "Open\nReject\nHold"
|
"options": "Open\nReplied\nRejected\nHold"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ wn.doclistviews['Job Applicant'] = wn.views.ListView.extend({
|
|||||||
init: function(d) {
|
init: function(d) {
|
||||||
this._super(d)
|
this._super(d)
|
||||||
this.fields = this.fields.concat([
|
this.fields = this.fields.concat([
|
||||||
"`tabSupport Ticket`.status",
|
"`tabJob Applicant`.status",
|
||||||
'`tabSupport Ticket`.modified_by'
|
'`tabJob Applicant`.modified_by'
|
||||||
|
|
||||||
]);
|
]);
|
||||||
this.stats = this.stats.concat(['status']);
|
this.stats = this.stats.concat(['status']);
|
||||||
@@ -33,8 +33,8 @@ wn.doclistviews['Job Applicant'] = wn.views.ListView.extend({
|
|||||||
columns: [
|
columns: [
|
||||||
{width: '3%', content: 'check'},
|
{width: '3%', content: 'check'},
|
||||||
{width: '5%', content:'avatar_modified'},
|
{width: '5%', content:'avatar_modified'},
|
||||||
{width: '50%', content:'name'},
|
{width: '30%', content:'name'},
|
||||||
{width: '30%', content:'status_html'},
|
{width: '50%', content:'status_html'},
|
||||||
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user