added job application
This commit is contained in:
parent
3074c89ffd
commit
b6f6d68de0
@ -37,11 +37,15 @@ class JobsMailbox(POP3Mailbox):
|
||||
name = self.get_existing_application(mail.from_email)
|
||||
if name:
|
||||
applicant = webnotes.model_wrapper("Job Applicant", name)
|
||||
if applicant.doc.status!="Rejected":
|
||||
applicant.doc.status = "Open"
|
||||
applicant.doc.save()
|
||||
else:
|
||||
applicant = webnotes.model_wrapper({
|
||||
"doctype":"Job Applicant",
|
||||
"applicant_name": mail.from_real_name or mail.from_email,
|
||||
"email_id": mail.from_email
|
||||
"email_id": mail.from_email,
|
||||
"status": "Open"
|
||||
})
|
||||
applicant.insert()
|
||||
|
||||
|
@ -9,4 +9,8 @@ class DocType(TransactionBase):
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
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,
|
||||
"creation": "2013-01-15 16:32:13",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2013-01-15 17:30:46"
|
||||
"modified": "2013-01-15 17:40:29"
|
||||
},
|
||||
{
|
||||
"autoname": "field:applicant_name",
|
||||
@ -59,7 +59,7 @@
|
||||
"label": "Status",
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"options": "Open\nReject\nHold"
|
||||
"options": "Open\nReplied\nRejected\nHold"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
|
@ -3,8 +3,8 @@ wn.doclistviews['Job Applicant'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabSupport Ticket`.status",
|
||||
'`tabSupport Ticket`.modified_by'
|
||||
"`tabJob Applicant`.status",
|
||||
'`tabJob Applicant`.modified_by'
|
||||
|
||||
]);
|
||||
this.stats = this.stats.concat(['status']);
|
||||
@ -33,8 +33,8 @@ wn.doclistviews['Job Applicant'] = wn.views.ListView.extend({
|
||||
columns: [
|
||||
{width: '3%', content: 'check'},
|
||||
{width: '5%', content:'avatar_modified'},
|
||||
{width: '50%', content:'name'},
|
||||
{width: '30%', content:'status_html'},
|
||||
{width: '30%', content:'name'},
|
||||
{width: '50%', content:'status_html'},
|
||||
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||
]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user