mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user