From 2d5727b17bcdd2fca43d3602c32fced4fa68acf9 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 5 Mar 2014 19:24:07 +0530 Subject: [PATCH] Ignore mandatory during email pulling --- erpnext/hr/doctype/job_applicant/get_job_applications.py | 3 +++ erpnext/selling/doctype/lead/get_leads.py | 1 + erpnext/support/doctype/support_ticket/get_support_mails.py | 1 + 3 files changed, 5 insertions(+) diff --git a/erpnext/hr/doctype/job_applicant/get_job_applications.py b/erpnext/hr/doctype/job_applicant/get_job_applications.py index 91d3fad25a..4f753450d0 100644 --- a/erpnext/hr/doctype/job_applicant/get_job_applications.py +++ b/erpnext/hr/doctype/job_applicant/get_job_applications.py @@ -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) diff --git a/erpnext/selling/doctype/lead/get_leads.py b/erpnext/selling/doctype/lead/get_leads.py index 169f25059d..77a94f7269 100644 --- a/erpnext/selling/doctype/lead/get_leads.py +++ b/erpnext/selling/doctype/lead/get_leads.py @@ -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 diff --git a/erpnext/support/doctype/support_ticket/get_support_mails.py b/erpnext/support/doctype/support_ticket/get_support_mails.py index d4d362b7a7..8ac5eba17a 100644 --- a/erpnext/support/doctype/support_ticket/get_support_mails.py +++ b/erpnext/support/doctype/support_ticket/get_support_mails.py @@ -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,