Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui

This commit is contained in:
Suraj Shetty
2021-01-29 08:56:22 +05:30
186 changed files with 5197 additions and 1366 deletions

View File

@@ -196,6 +196,13 @@ def create_lead_for_item_inquiry(lead, subject, message):
lead_doc.update(lead)
lead_doc.set('lead_owner', '')
if not frappe.db.exists('Lead Source', 'Product Inquiry'):
frappe.get_doc({
'doctype': 'Lead Source',
'source_name' : 'Product Inquiry'
}).insert(ignore_permissions=True)
lead_doc.set('source', 'Product Inquiry')
try:
lead_doc.save(ignore_permissions=True)
except frappe.exceptions.DuplicateEntryError: