Ignore mandatory during email pulling

This commit is contained in:
Anand Doshi 2014-03-05 19:24:07 +05:30
parent b2c2fca8a5
commit 2d5727b17b
3 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@ class JobsMailbox(POP3Mailbox):
applicant = frappe.bean("Job Applicant", name)
if applicant.doc.status!="Rejected":
applicant.doc.status = "Open"
applicant.ignore_permissions = True
applicant.doc.save()
else:
name = (mail.from_real_name and (mail.from_real_name + " - ") or "") \
@ -32,6 +33,8 @@ class JobsMailbox(POP3Mailbox):
"email_id": mail.from_email,
"status": "Open"
})
applicant.ignore_permissions = True
applicant.ignore_mandatory = True
applicant.insert()
mail.save_attachments_in_doc(applicant.doc)

View File

@ -22,6 +22,7 @@ def add_sales_communication(subject, content, sender, real_name, mail=None,
"source": "Email"
})
lead.ignore_permissions = True
lead.ignore_mandatory = True
lead.insert()
lead_name = lead.doc.name

View File

@ -72,6 +72,7 @@ def add_support_communication(subject, content, sender, docname=None, mail=None)
"status": "Open",
})])
ticket.ignore_permissions = True
ticket.ignore_mandatory = True
ticket.insert()
_make(content=content, sender=sender, subject = subject,