Fixed Make Sales Order from Quotation #1522
This commit is contained in:
parent
78eeacb53c
commit
8c62c40a3d
@ -78,7 +78,7 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"label": "Group",
|
"label": "Customer Group",
|
||||||
"oldfieldname": "customer_group",
|
"oldfieldname": "customer_group",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Customer Group",
|
"options": "Customer Group",
|
||||||
@ -278,7 +278,7 @@
|
|||||||
],
|
],
|
||||||
"icon": "icon-user",
|
"icon": "icon-user",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2014-03-03 19:05:58.000000",
|
"modified": "2014-03-03 19:06:00.000000",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Customer",
|
"name": "Customer",
|
||||||
|
@ -138,7 +138,8 @@ def _make_customer(source_name, ignore_permissions=False):
|
|||||||
quotation = frappe.db.get_value("Quotation", source_name, ["lead", "order_type"])
|
quotation = frappe.db.get_value("Quotation", source_name, ["lead", "order_type"])
|
||||||
if quotation and quotation[0]:
|
if quotation and quotation[0]:
|
||||||
lead_name = quotation[0]
|
lead_name = quotation[0]
|
||||||
customer_name = frappe.db.get_value("Customer", {"lead_name": lead_name})
|
customer_name = frappe.db.get_value("Customer", {"lead_name": lead_name},
|
||||||
|
["name", "customer_name"], as_dict=True)
|
||||||
if not customer_name:
|
if not customer_name:
|
||||||
from erpnext.selling.doctype.lead.lead import _make_customer
|
from erpnext.selling.doctype.lead.lead import _make_customer
|
||||||
customer_doclist = _make_customer(lead_name, ignore_permissions=ignore_permissions)
|
customer_doclist = _make_customer(lead_name, ignore_permissions=ignore_permissions)
|
||||||
@ -162,3 +163,5 @@ def _make_customer(source_name, ignore_permissions=False):
|
|||||||
except frappe.MandatoryError:
|
except frappe.MandatoryError:
|
||||||
from frappe.utils import get_url_to_form
|
from frappe.utils import get_url_to_form
|
||||||
frappe.throw(_("Please create Customer from Lead {0}").format(lead_name))
|
frappe.throw(_("Please create Customer from Lead {0}").format(lead_name))
|
||||||
|
else:
|
||||||
|
return customer_name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user